Browse Source

Merge branch 'master' into version/2.1

DarthSim 6 years ago
parent
commit
9fe723e357
3 changed files with 13 additions and 6 deletions
  1. 12 0
      CHANGELOG.md
  2. 1 0
      download.go
  3. 0 6
      processing_options.go

+ 12 - 0
CHANGELOG.md

@@ -1,5 +1,17 @@
 # Changelog
 
+## v2.0.3
+
+Fixed URL validation when IMGPROXY_BASE_URL is used
+
+## v2.0.2
+
+Fixed smart crop + blur/sharpen SIGSEGV on Alpine
+
+## v2.0.1
+
+Minor fixes
+
 ## v2.0.0
 
 All-You-Ever-Wanted release! :tada:

+ 1 - 0
download.go

@@ -29,6 +29,7 @@ var (
 	errSourceDimensionsTooBig      = errors.New("Source image dimensions are too big")
 	errSourceResolutionTooBig      = errors.New("Source image resolution are too big")
 	errSourceImageTypeNotSupported = errors.New("Source image type not supported")
+	errInvalidImageURL             = errors.New("Invalid image url")
 )
 
 var downloadBufPool = sync.Pool{

+ 0 - 6
processing_options.go

@@ -12,7 +12,6 @@ import (
 	"errors"
 	"fmt"
 	"net/http"
-	"net/url"
 	"regexp"
 	"strconv"
 	"strings"
@@ -134,7 +133,6 @@ const (
 var (
 	errInvalidURLEncoding                 = errors.New("Invalid url encoding")
 	errInvalidPath                        = errors.New("Invalid path")
-	errInvalidImageURL                    = errors.New("Invalid image url")
 	errResultingImageFormatIsNotSupported = errors.New("Resulting image format is not supported")
 )
 
@@ -766,10 +764,6 @@ func parsePath(ctx context.Context, r *http.Request) (context.Context, error) {
 		return ctx, err
 	}
 
-	if _, err = url.ParseRequestURI(imageURL); err != nil {
-		return ctx, errInvalidImageURL
-	}
-
 	ctx = context.WithValue(ctx, imageURLCtxKey, imageURL)
 	ctx = context.WithValue(ctx, processingOptionsCtxKey, po)