Code Duplication    Length = 6-8 lines in 2 locations

includes/upload/UploadBase.php 2 locations

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