summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/saml2/client_base.py7
-rw-r--r--src/saml2/mdstore.py2
-rw-r--r--src/saml2/server.py8
3 files changed, 8 insertions, 9 deletions
diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py
index 28e08b84..41df6585 100644
--- a/src/saml2/client_base.py
+++ b/src/saml2/client_base.py
@@ -191,8 +191,11 @@ class Base(Entity):
]
):
warn_msg = (
- "The SAML service provider accepts unsigned SAML Responses "
- "and Assertions. This configuration is insecure."
+ "The SAML service provider accepts "
+ "unsigned SAML Responses and Assertions. "
+ "This configuration is insecure. "
+ "Consider setting want_assertions_signed, want_response_signed "
+ "or want_assertions_or_response_signed configuration options."
)
logger.warning(warn_msg)
_warn(warn_msg)
diff --git a/src/saml2/mdstore.py b/src/saml2/mdstore.py
index 3dfd0e5a..c0eb1686 100644
--- a/src/saml2/mdstore.py
+++ b/src/saml2/mdstore.py
@@ -193,7 +193,7 @@ def destinations(srvs):
"instead, use `saml2.mdstore.locations` or `saml2.mdstore.all_locations`."
)
logger.warning(warn_msg)
- _warn(warn_msg)
+ _warn(warn_msg, DeprecationWarning)
values = list(locations(srvs))
return values
diff --git a/src/saml2/server.py b/src/saml2/server.py
index 6051be3a..eb6dddea 100644
--- a/src/saml2/server.py
+++ b/src/saml2/server.py
@@ -7,7 +7,6 @@ or attribute authority (AA) may use to conclude its tasks.
"""
import logging
import os
-from warnings import warn as _warn
import importlib
import dbm
@@ -525,11 +524,8 @@ class Server(Entity):
if not name_id and userid:
try:
- name_id = self.ident.construct_nameid(userid, policy,
- sp_entity_id)
- warn_msg = "Unspecified NameID format"
- logger.warning(warn_msg)
- _warn(warn_msg)
+ name_id = self.ident.construct_nameid(userid, policy, sp_entity_id)
+ logger.warning("Unspecified NameID format")
except Exception:
pass