Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
286
Merge Requests
38
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
cd45b302
Commit
cd45b302
authored
6 hours ago
by
Mark Harding
1
Browse files
Options
Download
(fix): always return 401 for mobile pam check
parent
68e4f5a4
master
No related merge requests found
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
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
([
...
...
This diff is collapsed.
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
;
}
...
...
This diff is collapsed.
Mark Harding
@markeharding
mentioned in issue
minds#962 (closed)
·
6 hours ago
mentioned in issue
minds#962 (closed)
mentioned in issue minds#962
Toggle commit list
Please
register
or
sign in
to comment