MantisBT: master c57a735d

Author Committer Branch Timestamp Parent
dregad dregad master 2017-08-09 22:43 master 48a9b048
Affected Issues  0023184: AJAX calls with invalid endpoints fail with syntax error
Changeset

XHR: send HTTP 400 error for invalid entry point

Returning an HTTP error code from xmlhttprequest back to the caller
instead of just outputting some arbitrary text message ensures that the
client's call actually fails, without relying on the failure being
caused by mismatch in output type, or detecting the error by parsing the
output.

HTTP 400 (Bad Request) error code was chosen following discussion in
pull request https://github.com/mantisbt/mantisbt/pull/1139.

Fixes 0023184

mod - xmlhttprequest.php Diff File