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 input parameter sanitization #60

Merged
merged 2 commits into from
Dec 24, 2024
Merged

Add input parameter sanitization #60

merged 2 commits into from
Dec 24, 2024

Conversation

v0lkan
Copy link
Contributor

@v0lkan v0lkan commented Dec 24, 2024

Added

  • input sanitization
  • and policy enforcement to all API methods.

Added
* input sanitization
* and policy enforcement
to all API methods.

Signed-off-by: Volkan Özçelik <me@volkan.io>
@v0lkan v0lkan self-assigned this Dec 24, 2024
@v0lkan v0lkan requested a review from kfox1111 as a code owner December 24, 2024 07:59
@@ -79,34 +78,16 @@ func RoutePutPolicy(
return errors.ErrReadFailure
}

// TODO: sanitize
err := guardPutPolicyRequest(*request, w, r)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poor man's aspect-oriented programming.

input validation and policy enforcement is a cross-cutting concern, so we are abstracting them in functions.

Added
* input sanitization
* and policy enforcement
to all API methods.

Signed-off-by: Volkan Özçelik <me@volkan.io>
@v0lkan v0lkan merged commit bda20d5 into main Dec 24, 2024
@v0lkan v0lkan deleted the feature/sanitization branch December 24, 2024 08:11
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.

1 participant