Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stricter requirements to existing routes #1150

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

melroy89
Copy link
Member

@melroy89 melroy89 commented Oct 1, 2024

  • Only allow integers on specific path routes, like for entry_id or id, etc.
  • Increase safety as well
  • This will also solves the 500 errors, since the path is just invalid, meaning no invalid DB calls anymore. And no unnecessary DB load. The routes are only passed to the controller if they are valid requests...

Note: For now I leave the API routes as is. And I also leave the activity_pub routes as is.. Also indirectly fixes the 23rd issue in: #1119

@melroy89 melroy89 added this to the v1.7.2 milestone Oct 1, 2024
@melroy89 melroy89 added enhancement New feature or request security Issues and pull requests that address security concerns labels Oct 1, 2024
@melroy89
Copy link
Member Author

melroy89 commented Oct 1, 2024

Tested on: https://kbin.melroy.org/ (and works great!)

@melroy89 melroy89 merged commit d9fe926 into main Oct 1, 2024
7 checks passed
@melroy89 melroy89 deleted the add_requirements_to_routes branch October 1, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security Issues and pull requests that address security concerns
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants