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

Hardening suggestions for Stirling-PDF / fix_stamp_margins #788

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

pixeebot[bot]
Copy link
Contributor

@pixeebot pixeebot bot commented Feb 8, 2024

I've reviewed the recently opened PR (787 - fix: use the same margins for x and y in the stamp feature) and have identified some area(s) that could benefit from additional hardening measures.

These changes should help prevent potential security vulnerabilities and improve overall code quality.

Thank you for your consideration!

docs | feedback
Powered by: pixeebot

@pixeebot pixeebot bot requested a review from Frooodle as a code owner February 8, 2024 02:46
@pixeebot pixeebot bot requested a review from sbplat February 8, 2024 02:46
@@ -68,7 +68,7 @@ public ResponseEntity<byte[]> extractHeader(@ModelAttribute PDFFile request) thr

if (script.isEmpty()) {
script =
"PDF '" + inputFile.getOriginalFilename() + "' does not contain Javascript";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wrapped the file name with a sanitizer call that takes out path escaping characters

Copy link
Member

@sbplat sbplat left a comment

Choose a reason for hiding this comment

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

Seems fine to me.

@sbplat sbplat merged commit 2e0790c into fix_stamp_margins Feb 8, 2024
2 checks passed
@sbplat sbplat deleted the pixeebot/fix_stamp_margins branch February 8, 2024 02:52
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