View Issue Details

IDProjectCategoryView StatusLast Update
0033023mantisbtapi restpublic2023-10-31 16:32
Reporterdregad Assigned Todregad  
Status closedResolutionfixed 
Target Version2.26.0Fixed in Version2.26.0 
Summary0033023: REST and SOAP APIs fail to report that Mantis is offline

The REST API OfflineMiddleware calls mci_is_mantis_offline(), which checks for presence of mantis_offline.php file except that it looks in the wrong directory (/api instead of /) because it only goes up 2 levels with dirname().

Steps To Reproduce
  • Set Mantis offline touch /path/to/mantisbt/mantis_offline.php
  • Make an API call, e.g. curl -si http://localhost/mantis/api/rest/issues/1
Additional Information

Problem is present since initial release of SOAP API in release-1.1.0a4 (2007)...

TagsNo tags attached.


There are no notes attached to this issue.

Related Changesets

MantisBT: master a8a011f2

2023-10-16 11:07


Details Diff
Fix broken Offline check from REST/SOAP API

mc_api.php resides in ./api/soap, but mci_is_mantis_offline() went up 2
levels instead of 3 to get to MantisBT root to check for presence of the
`mantis_offline.php` file.

Fixes 0033023
Affected Issues
mod - api/soap/mc_api.php Diff File