@@ 461-468 (lines=8) @@ | ||
458 | } |
|
459 | ||
460 | # check for htmlish code and javascript |
|
461 | if ( !$wgDisableUploadScriptChecks ) { |
|
462 | if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) { |
|
463 | $svgStatus = $this->detectScriptInSvg( $this->mTempPath, false ); |
|
464 | if ( $svgStatus !== false ) { |
|
465 | return $svgStatus; |
|
466 | } |
|
467 | } |
|
468 | } |
|
469 | ||
470 | $handler = MediaHandler::getHandler( $mime ); |
|
471 | if ( $handler ) { |
|
@@ 523-528 (lines=6) @@ | ||
520 | if ( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) { |
|
521 | return [ 'uploadscripted' ]; |
|
522 | } |
|
523 | if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) { |
|
524 | $svgStatus = $this->detectScriptInSvg( $this->mTempPath, true ); |
|
525 | if ( $svgStatus !== false ) { |
|
526 | return $svgStatus; |
|
527 | } |
|
528 | } |
|
529 | } |
|
530 | ||
531 | # Check for Java applets, which if uploaded can bypass cross-site |