Fix AuthTag-Subsumption to not be order-dependent

Fixes #241
This commit is contained in:
Gregor Kleen 2018-11-30 17:55:52 +01:00
parent 9fc052d9bb
commit 2cecac6955

View File

@ -562,7 +562,7 @@ routeAuthTags = fmap (impureNonNull . Set.mapMonotonic impureNonNull) . ofoldM p
| oany (authTags `Set.isSubsetOf`) prev
-> Right prev
| otherwise
-> Right $ Set.insert authTags prev
-> Right . Set.insert authTags $ Set.filter (not . (`Set.isSubsetOf` authTags)) prev
| otherwise
= Left $ InvalidAuthTag t