Code Duplication    Length = 6-8 lines in 2 locations

includes/upload/UploadBase.php 2 locations

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