@@ -514,19 +514,19 @@ private function recursor($Files = '', int $Depth = -1): void
514
514
}
515
515
516
516
/** Read in the file to be scanned. */
517
- $ in = $ this ->Loader ->readFileBlocks ($ Files , (
517
+ $ In = $ this ->Loader ->readFileBlocks ($ Files , (
518
518
$ this ->Loader ->Configuration ['files ' ]['scannable_threshold ' ] > 0 &&
519
519
$ fS > $ this ->Loader ->readBytes ($ this ->Loader ->Configuration ['files ' ]['scannable_threshold ' ])
520
520
) ? $ this ->Loader ->readBytes ($ this ->Loader ->Configuration ['files ' ]['scannable_threshold ' ]) : $ fS , true );
521
521
522
522
/** Generate CRC for the file to be scanned. */
523
- $ fdCRC = hash ('crc32b ' , $ in );
523
+ $ fdCRC = hash ('crc32b ' , $ In );
524
524
525
525
/** Generate SHA256 for the file to be scanned. */
526
- $ SHA256 = hash ('sha256 ' , $ in );
526
+ $ SHA256 = hash ('sha256 ' , $ In );
527
527
528
528
/** Check for non-image items. */
529
- if (!empty ($ in ) && $ this ->Loader ->Configuration ['files ' ]['only_allow_images ' ] && !$ this ->imageIndicators ($ xt , bin2hex (substr ($ in , 0 , 16 )))) {
529
+ if (!empty ($ In ) && $ this ->Loader ->Configuration ['files ' ]['only_allow_images ' ] && !$ this ->imageIndicators ($ xt , bin2hex (substr ($ In , 0 , 16 )))) {
530
530
$ this ->Loader ->InstanceCache ['ThisScanDone ' ]++;
531
531
$ this ->Loader ->Events ->fireEvent ('countersChanged ' );
532
532
$ this ->Loader ->atHit ($ SHA256 , $ fS , $ OriginalFilenameClean , sprintf (
@@ -547,7 +547,7 @@ private function recursor($Files = '', int $Depth = -1): void
547
547
$ this ->Loader ->InstanceCache ['ObjectsScanned ' ]++;
548
548
549
549
/** Send the scan target to the data handler. */
550
- $ this ->dataHandler ($ in , $ Depth , $ OriginalFilenameClean );
550
+ $ this ->dataHandler ($ In , $ Depth , $ OriginalFilenameClean );
551
551
552
552
/**
553
553
* Check whether the file is compressed. If it's compressed, attempt to
@@ -557,7 +557,7 @@ private function recursor($Files = '', int $Depth = -1): void
557
557
if (!empty ($ this ->Loader ->InstanceCache ['CheckWasLast ' ])) {
558
558
559
559
/** Create a new compression object. */
560
- $ CompressionObject = new CompressionHandler ($ in );
560
+ $ CompressionObject = new CompressionHandler ($ In );
561
561
562
562
/** Now we'll try to decompress the file. */
563
563
if (!$ CompressionResults = $ CompressionObject ->TryEverything ()) {
@@ -569,28 +569,28 @@ private function recursor($Files = '', int $Depth = -1): void
569
569
* Replace originally scanned data with decompressed data in case
570
570
* needed by the archive handler.
571
571
*/
572
- $ in = $ CompressionObject ->Data ;
572
+ $ In = $ CompressionObject ->Data ;
573
573
}
574
574
575
575
/** Cleanup. */
576
576
unset($ CompressionObject );
577
577
}
578
578
579
- $ inLen = strlen ($ in );
579
+ $ InLen = strlen ($ In );
580
580
581
581
/** Executed if any problems were detected. */
582
582
if (empty ($ this ->Loader ->InstanceCache ['CheckWasLast ' ])) {
583
583
584
584
/** Quarantine if necessary. */
585
585
if (
586
586
$ this ->Loader ->Configuration ['quarantine ' ]['quarantine_key ' ] &&
587
- $ inLen > 0 &&
588
- $ inLen < $ this ->Loader ->readBytes ($ this ->Loader ->Configuration ['quarantine ' ]['quarantine_max_filesize ' ])
587
+ $ InLen > 0 &&
588
+ $ InLen < $ this ->Loader ->readBytes ($ this ->Loader ->Configuration ['quarantine ' ]['quarantine_max_filesize ' ])
589
589
) {
590
590
/** Note: "qfu" = "Quarantined File Upload". */
591
591
$ qfu = $ this ->Loader ->Time . '- ' . hash ('md5 ' , $ this ->Loader ->Configuration ['quarantine ' ]['quarantine_key ' ] . $ fdCRC . $ this ->Loader ->Time );
592
592
$ this ->quarantine (
593
- $ in ,
593
+ $ In ,
594
594
$ this ->Loader ->Configuration ['quarantine ' ]['quarantine_key ' ],
595
595
$ _SERVER [$ this ->Loader ->Configuration ['core ' ]['ipaddr ' ]],
596
596
$ qfu
@@ -615,7 +615,7 @@ private function recursor($Files = '', int $Depth = -1): void
615
615
*/
616
616
if (
617
617
$ this ->Loader ->Configuration ['files ' ]['check_archives ' ] &&
618
- !empty ($ in ) &&
618
+ !empty ($ In ) &&
619
619
$ this ->Loader ->Configuration ['files ' ]['max_recursion ' ] > 1
620
620
) {
621
621
/** Define archive phase. */
@@ -625,7 +625,7 @@ private function recursor($Files = '', int $Depth = -1): void
625
625
$ this ->Loader ->InstanceCache ['tempfilesToDelete ' ] = [];
626
626
627
627
/** Begin processing archives. */
628
- $ this ->archiveRecursor ($ in , (isset ($ CompressionResults ) && !$ CompressionResults ) ? '' : $ Files , $ Depth , $ OriginalFilenameClean );
628
+ $ this ->archiveRecursor ($ In , (isset ($ CompressionResults ) && !$ CompressionResults ) ? '' : $ Files , $ Depth , $ OriginalFilenameClean );
629
629
630
630
/** Begin deleting any temporary files that snuck through. */
631
631
foreach ($ this ->Loader ->InstanceCache ['tempfilesToDelete ' ] as $ DeleteThis ) {
@@ -636,7 +636,7 @@ private function recursor($Files = '', int $Depth = -1): void
636
636
637
637
/** Add hash cache entry here if necessary (e.g., because of encryption). */
638
638
if (
639
- ($ InSha256 = hash ('sha256 ' , $ in )) &&
639
+ ($ InSha256 = hash ('sha256 ' , $ In )) &&
640
640
($ AtInstanceLookupKey = sprintf ('%s:%d:%s ' , $ InSha256 , strlen ($ In ), $ OriginalFilenameClean )) &&
641
641
isset ($ this ->Loader ->ScanResultsIntegers [$ AtInstanceLookupKey ]) &&
642
642
$ this ->Loader ->ScanResultsIntegers [$ AtInstanceLookupKey ] === -4 &&
@@ -657,12 +657,12 @@ private function recursor($Files = '', int $Depth = -1): void
657
657
if (empty ($ this ->Loader ->InstanceCache ['CheckWasLast ' ])) {
658
658
if (
659
659
$ this ->Loader ->Configuration ['quarantine ' ]['quarantine_key ' ] &&
660
- strlen ($ in ) < $ this ->Loader ->readBytes ($ this ->Loader ->Configuration ['quarantine ' ]['quarantine_max_filesize ' ])
660
+ strlen ($ In ) < $ this ->Loader ->readBytes ($ this ->Loader ->Configuration ['quarantine ' ]['quarantine_max_filesize ' ])
661
661
) {
662
662
/** Note: "qfu" = "Quarantined File Upload". */
663
663
$ qfu = $ this ->Loader ->Time . '- ' . hash ('md5 ' , $ this ->Loader ->Configuration ['quarantine ' ]['quarantine_key ' ] . $ fdCRC . $ this ->Loader ->Time );
664
664
$ this ->quarantine (
665
- $ in ,
665
+ $ In ,
666
666
$ this ->Loader ->Configuration ['quarantine ' ]['quarantine_key ' ],
667
667
$ _SERVER [$ this ->Loader ->Configuration ['core ' ]['ipaddr ' ]],
668
668
$ qfu
0 commit comments