Code Duplication    Length = 6-8 lines in 2 locations

includes/upload/UploadBase.php 2 locations

@@ 449-456 (lines=8) @@
446
		}
447
448
		# check for htmlish code and javascript
449
		if ( !$wgDisableUploadScriptChecks ) {
450
			if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
451
				$svgStatus = $this->detectScriptInSvg( $this->mTempPath, false );
452
				if ( $svgStatus !== false ) {
453
					return $svgStatus;
454
				}
455
			}
456
		}
457
458
		$handler = MediaHandler::getHandler( $mime );
459
		if ( $handler ) {
@@ 506-511 (lines=6) @@
503
			if ( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
504
				return [ 'uploadscripted' ];
505
			}
506
			if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
507
				$svgStatus = $this->detectScriptInSvg( $this->mTempPath, true );
508
				if ( $svgStatus !== false ) {
509
					return $svgStatus;
510
				}
511
			}
512
		}
513
514
		# Check for Java applets, which if uploaded can bypass cross-site