Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
282
Issues
282
List
Boards
Labels
Service Desk
Milestones
Merge Requests
37
Merge Requests
37
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
cd45b302
Commit
cd45b302
authored
Nov 24, 2019
by
Mark Harding
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): always return 401 for mobile pam check
parent
68e4f5a4
Pipeline
#98153650
passed with stages
in 11 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Api/Factory.php
Api/Factory.php
+4
-0
Core/Security/XSRF.php
Core/Security/XSRF.php
+0
-4
No files found.
Api/Factory.php
View file @
cd45b302
...
...
@@ -110,6 +110,10 @@ class Factory
$code
=
!
Security\XSRF
::
validateRequest
()
?
403
:
401
;
if
(
isset
(
$_SERVER
[
'HTTP_APP_VERSION'
]))
{
$code
=
401
;
// Mobile requires 401 errors
}
header
(
'Content-type: application/json'
);
http_response_code
(
$code
);
echo
json_encode
([
...
...
Core/Security/XSRF.php
View file @
cd45b302
...
...
@@ -17,10 +17,6 @@ class XSRF
public
static
function
validateRequest
()
{
if
(
isset
(
$_SERVER
[
'HTTP_APP_VERSION'
]))
{
return
true
;
// This is mobile
}
if
(
!
isset
(
$_SERVER
[
'HTTP_X_XSRF_TOKEN'
]))
{
return
false
;
}
...
...
Mark Harding
@markeharding
mentioned in issue
minds#962 (closed)
·
Nov 24, 2019
mentioned in issue
minds#962 (closed)
mentioned in issue minds#962
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment