Skip to content

Add opt-in protectAllExtensions to challenge routes with dotted URLs [minor] - #109

Merged
joecorall merged 1 commit into
libops:mainfrom
discoverygarden:protect-all-extensions
Sep 3, 2026
Merged

Add opt-in protectAllExtensions to challenge routes with dotted URLs [minor]#109
joecorall merged 1 commit into
libops:mainfrom
discoverygarden:protect-all-extensions

Conversation

@mitchmac

@mitchmac mitchmac commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

A site that we support has Drupal content with path aliases containing dots. Bots were getting to the content because of the protectFileExtensions logic. There were more than 150 pseudo-extensions (really just the content in the path after the last dot) that we would have needed to protect. So instead of trying to enumerate all of the potentially growing list of "extensions", protecting all extensions seems like a suitable option.

This PR introduces a protectAllExtensions configuration that when set to true (defaults to false for backwards compatibility), will apply protection logic to file-like paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joecorall joecorall changed the title Add opt-in protectAllExtensions to challenge routes with dotted URLs Add opt-in protectAllExtensions to challenge routes with dotted URLs [minor] Sep 3, 2026
@joecorall
joecorall merged commit fc0dfb5 into libops:main Sep 3, 2026
@mitchmac

mitchmac commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @joecorall !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants