Skip to content

Commit fcbd4dd

Browse files
fix: FilterAttributeValues: use re.fullmatch, remove unnecessary compile
... as per review in #432
1 parent f7fcadf commit fcbd4dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/satosa/micro_services/attribute_modifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def _shibmdscope_match_value(self, value, md_scopes):
8181
for md_scope in md_scopes:
8282
if not md_scope['regexp'] and md_scope['text'] == value:
8383
return True
84-
elif md_scope['regexp'] and re.compile(md_scope['text']).match(value):
84+
elif md_scope['regexp'] and re.fullmatch(md_scope['text'], value):
8585
return True
8686
return False
8787

0 commit comments

Comments
 (0)