Skip to content

Commit

Permalink
chore: update exclude rules
Browse files Browse the repository at this point in the history
  • Loading branch information
guqing committed Oct 10, 2024
1 parent b627e7c commit 9721d21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ public class PageInjectionExcluderImpl implements PageInjectionExcluder {
private final Set<String> exactMatches = Set.of(
"login",
"signup",
"logout",
"password-reset",
"password-reset-link"
"logout"
);

private final Set<Pattern> regexPatterns = Set.of(
Pattern.compile("error/.*"),
Pattern.compile("challenges/.*"),
Pattern.compile("password-reset/.*"),
Pattern.compile("login_.*")
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ void excludeTest() {
"login",
"signup",
"logout",
"password-reset",
"password-reset-link",
"password-reset/email/reset",
"error/404",
"error/500",
"challenges/totp",
Expand Down Expand Up @@ -55,4 +54,4 @@ void shouldNotExcludeTest() {
assertThat(pageInjectionExcluder.isExcluded(templateName)).isFalse();
}
}
}
}

0 comments on commit 9721d21

Please sign in to comment.