-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
No error returned when Max-Days is invalid #420
Comments
Hey can I take this issue? |
@anihm136 how much high the value must be set? |
Maybe overkill, but I did a binary search and it appears to fail at 8217934 days |
I'm curious if this broke uploading as I am getting a 400 error now on my self-hosted install and when attempting to upload a file via the command line. On the command line I see:
I didn't provide the header and I assume it shouldn't be a requirement? Edit: I wonder if in } else if (metadata.MaxDate) && (time.Now().After(metadata.MaxDate)) { I don't know anything about Go, but I think you may understand my point? Basically it checks to see if |
Indeed it seems so @jimmybrancaccio, glad you spotted this so soon. @kugiyasan it should be something like this, can you create a new PR?
thanks |
Oops sorry! I made the PR asap, @aspacca |
Looks good now @aspacca and @kugiyasan Thank you both! ❤️ |
…ch-1 * 'patch-1' of github.com:GanZhiXiong/transfer.sh: issue dutchcoders#420 added MaxDate.IsZero() check (dutchcoders#427) fix go1.16, add go1.17 bump bluemonday Revert "issue dutchcoders#420 return 400 response when Max-Days is too big (dutchcoders#422)" (dutchcoders#426) issue dutchcoders#420 return 400 response when Max-Days is too big (dutchcoders#422) Implement Nix Flake (dutchcoders#424) fix missed errors (dutchcoders#417) Fix path (dutchcoders#416) Edited code of condunct for more information and corrected a grammatical error (dutchcoders#421) Update README.md (dutchcoders#415) Update README.md
When a file is uploaded with a very high value set for
Max-Days
header, the server returns a URL. However, the URL leads to a 404 pageExpected behavior:
The server should return an appropriate 400 response when an invalid value is set for the header
The text was updated successfully, but these errors were encountered: