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

[Bugfix] gin web framework does not properly sanitize filename parameter of Context.FileAttachment function #1620

Merged
merged 2 commits into from
May 14, 2024

Commits on May 13, 2024

  1. [Bugfix] gin web framework does not properly sanitize filename parame…

    …ter of `Context.FileAttachment` function
    
    The filename parameter of the Context.FileAttachment function is not properly sanitized. A maliciously crafted filename can cause the Content-Disposition header to be sent with an unexpected filename value or otherwise modify the Content-Disposition header. For example, a filename of "setup.bat";x=.txt" will be sent as a file named "setup.bat".
    
    If the FileAttachment function is called with names provided by an untrusted source, this may permit an attacker to cause a file to be served with a name different than provided. Maliciously crafted attachment file name can modify the Content-Disposition header.
    sufatmawati authored May 13, 2024
    Configuration menu
    Copy the full SHA
    adfa292 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. run go mod tidy

    dmathieu committed May 14, 2024
    Configuration menu
    Copy the full SHA
    3b36035 View commit details
    Browse the repository at this point in the history