SAML metadata page shouldn't redirect to main page when a site is in maintenance mode

Bug #1724743 reported by Dmitrii Metelkin on 2017-10-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cecilia Vela Gurovic

Bug Description

SAML metadata page /auth/saml/sp/metadata.php shouldn't redirect to main page when a site is in maintenance mode. Ideally, it should send 503 HTTP response to let systems who read the metadata know, that the file is not accessible.

description: updated
Changed in mahara:
milestone: none → 18.04.0
status: New → Confirmed
importance: Undecided → Medium
Robert Lyon (robertl-9) wrote :

Around line 391 of init.php we check if site is closed for upgrade/maintenance mode and if so we logout the user and redirect them to homepage if not doing install/upgrade.

Where we check $USER->is_logged_in() on line 396 we could also check if the auth instance is an external vs internal auth type and reply with the correct HTTP response and/or json object saying access is not available if external auth type before logging them out and redirecting to hompage.

Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Robert Lyon (robertl-9) wrote :

Actually we should just allow the public metadata page to be accessible when in maintenance mode as that will be the easier fix

Changed in mahara:
status: Confirmed → In Progress

Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit ea596952b4e28d573aa6e41919f326954045e991
Author: Robert Lyon <email address hidden>
Date: Thu Mar 8 11:55:05 2018 +1300

Bug 1724743: Allow pages to ignore maintenance mode

by defining IGNOREMAINTENANCE in the php file

Useful to allow certain public pages to still be accessible to outside
world, eg the SAML metadata


Change-Id: If5e5e7520917c3128571537c5d50ed3fdd4add04
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2018-03-08
Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
Robert Lyon (robertl-9) on 2018-04-05
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers