diff options
author | stuebinm | 2021-12-20 00:15:08 +0100 |
---|---|---|
committer | stuebinm | 2021-12-20 00:15:08 +0100 |
commit | 5060f68b9728bf94818ee985c16c25511f248143 (patch) | |
tree | bc1f938be559c5e9c723c18211888db618f2607d /lib/Properties.hs | |
parent | fc9f714d03a9d018ab9f2474affcf995eb60a4e2 (diff) |
disallow extended API variables in links
Diffstat (limited to '')
-rw-r--r-- | lib/Properties.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs index a326e30..797a1d7 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -556,6 +556,7 @@ unwrapPath str f = case parsePath str of AbsolutePath -> forbid "absolute paths are disallowed. Use world:// instead." UnderscoreMapLink -> forbid "map links using /_/ are disallowed. Use world:// instead." AtMapLink -> forbid "map links using /@/ are disallowed. Use world:// instead." + PathVarsDisallowed -> forbid "extended API variables are not allowed in asset paths." unwrapBadgeToken :: Text -> (BadgeToken -> LintWriter a) -> LintWriter a unwrapBadgeToken str f = case parseToken str of @@ -583,6 +584,7 @@ unwrapURI sym p@(Property name _) f g = unwrapString p $ \link -> do \\"" <> name <> "\"; allowed " <> (if length allowed == 1 then "is " else "are ") <> intercalate ", " (fmap (<> "://") allowed) <> "." + VarsDisallowed -> "extended API links are disallowed in links" -- | just asserts that this is a string isString :: Property -> LintWriter a |