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

Bug #1724743 reported by Dmitrii Metelkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
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
Revision history for this message
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)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8593

Revision history for this message
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
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8593
Committed: https://git.mahara.org/mahara/mahara/commit/ea596952b4e28d573aa6e41919f326954045e991
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

behatnotneeded

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.