mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-12 11:46:10 +02:00
Fix possible infinite loop during SVG sanitization
This commit is contained in:
parent
d07a016b66
commit
a518b3a4d2
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
- Fix false-positive SVG detections.
|
- Fix false-positive SVG detections.
|
||||||
|
- Fix possible infinite loop during SVG sanitization.
|
||||||
- (pro) Fix saving of GIF with variable frame delay to MP4.
|
- (pro) Fix saving of GIF with variable frame delay to MP4.
|
||||||
|
|
||||||
## [3.9.0] - 2022-10-19
|
## [3.9.0] - 2022-10-19
|
||||||
|
@ -40,6 +40,9 @@ func Satitize(data *imagedata.ImageData) (*imagedata.ImageData, error) {
|
|||||||
|
|
||||||
if ignoreTag > 0 {
|
if ignoreTag > 0 {
|
||||||
switch tt {
|
switch tt {
|
||||||
|
case xml.ErrorToken:
|
||||||
|
cancel()
|
||||||
|
return nil, l.Err()
|
||||||
case xml.EndTagToken, xml.StartTagCloseVoidToken:
|
case xml.EndTagToken, xml.StartTagCloseVoidToken:
|
||||||
ignoreTag--
|
ignoreTag--
|
||||||
case xml.StartTagToken:
|
case xml.StartTagToken:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user