Skip to content

Commit 255c34e

Browse files
author
Roland Hedberg
committed
Merge branch 'master' of github.com:rohe/pysaml2
2 parents 1e2d95c + 5661d8c commit 255c34e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/saml2/assertion.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3+
import copy
34
import importlib
45
import logging
5-
66
import re
7-
from saml2.saml import NAME_FORMAT_URI
87
import six
9-
from saml2 import xmlenc
108

119
from saml2 import saml
12-
13-
from saml2.time_util import instant, in_a_while
10+
from saml2 import xmlenc
1411
from saml2.attribute_converter import from_local, get_local_name
15-
from saml2.s_utils import sid, MissingValue
16-
from saml2.s_utils import factory
1712
from saml2.s_utils import assertion_factory
13+
from saml2.s_utils import factory
14+
from saml2.s_utils import sid, MissingValue
15+
from saml2.saml import NAME_FORMAT_URI
16+
from saml2.time_util import instant, in_a_while
1817

1918
logger = logging.getLogger(__name__)
2019

@@ -332,7 +331,7 @@ def compile(self, restrictions):
332331
a compiled regular expression.
333332
"""
334333

335-
self._restrictions = restrictions.copy()
334+
self._restrictions = copy.deepcopy(restrictions)
336335

337336
for who, spec in self._restrictions.items():
338337
if spec is None:

src/saml2/mdstore.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,8 @@ def load(self, *args, **kwargs):
850850
kwargs.update(_args)
851851
_md = InMemoryMetaData(self.attrc, args[1])
852852
elif typ == "remote":
853+
if "url" not in kwargs:
854+
raise ValueError("Remote metadata must be structured as a dict containing the key 'url'")
853855
key = kwargs["url"]
854856
for _key in ["node_name", "check_validity"]:
855857
try:

0 commit comments

Comments
 (0)