1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-03-17 20:17:48 +02:00

Detect deprecated basic URL format

This commit is contained in:
DarthSim 2021-12-07 15:16:59 +06:00
parent cf884f860c
commit c2ea40b240
2 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@
## [Unreleased]
### Change
- Improved ICC profiles handling.
- Proper error message when the deprecated basic URL format is used.
### Fix
- (pro) Fix parsing metadata of extended sequential JPEGs.

View File

@ -942,6 +942,14 @@ func defaultProcessingOptions(headers http.Header) (*ProcessingOptions, error) {
}
func parsePathOptions(parts []string, headers http.Header) (*ProcessingOptions, string, error) {
if _, ok := resizeTypes[parts[0]]; ok {
return nil, "", ierrors.New(
404,
"It looks like you're using the deprecated basic URL format",
"Invalid URL",
)
}
po, err := defaultProcessingOptions(headers)
if err != nil {
return nil, "", err