Commit cd45b302 authored by Mark Harding's avatar Mark Harding

(fix): always return 401 for mobile pam check

parent 68e4f5a4
No related merge requests found
Pipeline #98153650 passed with stages
in 11 minutes and 8 seconds
......@@ -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([
......
......@@ -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;
}
......
Please register or to comment