SimpleSamlphp metadata refresh causing cron problems

Bug #1950199 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 22.04
20.10
High
Unassigned
21.04
High
Unassigned
21.10
High
Unassigned
22.04
High
Unassigned

Bug Description

When we have:
1) a site has a timezone / country selected
2) a site that has SAML installed
3) an institution set up with a SAML auth instance
4) the SAML auth instance has 'Metadata URL for auto-refresh' set to a valid value

The timezone gets changed because of the getTime() method in the htdocs/auth/saml/extlib/simplesamlphp/modules/metarefresh/lib/MetaLoader.php file setting the timezone to UTC.

This means any cron job happening after the PluginAuthSaml::auth_saml_refresh_cron one will be using the wrong 'time' to compare to and so some cron jobs won't run when they should.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "main" branch: https://reviews.mahara.org/12233

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12233
Committed: https://git.mahara.org/mahara/mahara/commit/5a239852fb2c166c19f46d42acf59035aeabb40b
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit 5a239852fb2c166c19f46d42acf59035aeabb40b
Author: Robert Lyon <email address hidden>
Date: Tue Nov 9 10:46:25 2021 +1300

Bug 1950199: Reset mahara timezone after saml cron breaks it

There is a part of the SAML core code that sets the timezone to UTC
when creating the metadata refresh file.

This causes all cron jobs after it in the same run to use the
incorrect timezone

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

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "21.10_DEV" branch: https://reviews.mahara.org/12356

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.04_DEV" branch: https://reviews.mahara.org/12357

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "20.10_DEV" branch: https://reviews.mahara.org/12358

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12357
Committed: https://git.mahara.org/mahara/mahara/commit/1823dc436a95fa588bcaf92fa0a4408476ff5209
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.04_DEV

commit 1823dc436a95fa588bcaf92fa0a4408476ff5209
Author: Robert Lyon <email address hidden>
Date: Tue Nov 9 10:46:25 2021 +1300

Bug 1950199: Reset mahara timezone after saml cron breaks it

There is a part of the SAML core code that sets the timezone to UTC
when creating the metadata refresh file.

This causes all cron jobs after it in the same run to use the
incorrect timezone

Change-Id: Id6c741b439ef42c50edc844878969f90e24a29b6
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 5a239852fb2c166c19f46d42acf59035aeabb40b)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/12356
Committed: https://git.mahara.org/mahara/mahara/commit/30676ef27b800ea0b0ffcc4e1a4edc78030760a6
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.10_DEV

commit 30676ef27b800ea0b0ffcc4e1a4edc78030760a6
Author: Robert Lyon <email address hidden>
Date: Tue Nov 9 10:46:25 2021 +1300

Bug 1950199: Reset mahara timezone after saml cron breaks it

There is a part of the SAML core code that sets the timezone to UTC
when creating the metadata refresh file.

This causes all cron jobs after it in the same run to use the
incorrect timezone

Change-Id: Id6c741b439ef42c50edc844878969f90e24a29b6
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 5a239852fb2c166c19f46d42acf59035aeabb40b)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/12358
Committed: https://git.mahara.org/mahara/mahara/commit/0bcedb911498e7b8e698c8fadca04c091af8a15e
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.10_DEV

commit 0bcedb911498e7b8e698c8fadca04c091af8a15e
Author: Robert Lyon <email address hidden>
Date: Tue Nov 9 10:46:25 2021 +1300

Bug 1950199: Reset mahara timezone after saml cron breaks it

There is a part of the SAML core code that sets the timezone to UTC
when creating the metadata refresh file.

This causes all cron jobs after it in the same run to use the
incorrect timezone

Change-Id: Id6c741b439ef42c50edc844878969f90e24a29b6
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 5a239852fb2c166c19f46d42acf59035aeabb40b)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers