View Issue Details

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

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.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master a8a011f2

2023-10-16 11:07

dregad


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
0033023
mod - api/soap/mc_api.php Diff File