From aeca66a288cc822b3469dd0190eed596e0755113 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 17 Feb 2020 21:32:23 +0100 Subject: [PATCH] providers/saml: change assertion_valid_not_before default to -5 minutes --- .../migrations/0006_auto_20200217_2031.py | 25 +++++++++++++++++++ passbook/providers/saml/models.py | 6 ++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 passbook/providers/saml/migrations/0006_auto_20200217_2031.py diff --git a/passbook/providers/saml/migrations/0006_auto_20200217_2031.py b/passbook/providers/saml/migrations/0006_auto_20200217_2031.py new file mode 100644 index 000000000..9e190405f --- /dev/null +++ b/passbook/providers/saml/migrations/0006_auto_20200217_2031.py @@ -0,0 +1,25 @@ +# Generated by Django 3.0.3 on 2020-02-17 20:31 + +from django.db import migrations, models +import passbook.providers.saml.utils.time + + +class Migration(migrations.Migration): + + dependencies = [ + ("passbook_providers_saml", "0005_remove_samlpropertymapping_values"), + ] + + operations = [ + migrations.AlterField( + model_name="samlprovider", + name="assertion_valid_not_before", + field=models.TextField( + default="minutes=-5", + help_text="Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3).", + validators=[ + passbook.providers.saml.utils.time.timedelta_string_validator + ], + ), + ), + ] diff --git a/passbook/providers/saml/models.py b/passbook/providers/saml/models.py index bee0dd4ac..d69c2d189 100644 --- a/passbook/providers/saml/models.py +++ b/passbook/providers/saml/models.py @@ -23,12 +23,12 @@ class SAMLProvider(Provider): issuer = models.TextField() assertion_valid_not_before = models.TextField( - default="minutes=5", + default="minutes=-5", validators=[timedelta_string_validator], help_text=_( ( - "Assertion valid not before current time - this value " - "(Format: hours=1;minutes=2;seconds=3)." + "Assertion valid not before current time + this value " + "(Format: hours=-1;minutes=-2;seconds=-3)." ) ), )