Skip to content

Commit a0f2d41

Browse files
committed
Removing false positives
1 parent 0fe27e0 commit a0f2d41

File tree

4 files changed

+3
-67
lines changed

4 files changed

+3
-67
lines changed

generated/filesystem.php

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -877,53 +877,6 @@ function glob(string $pattern, int $flags = 0): array
877877
}
878878

879879

880-
/**
881-
* Tells whether the filename is executable.
882-
*
883-
* @param string $filename Path to the file.
884-
* @throws FilesystemException
885-
*
886-
*/
887-
function is_executable(string $filename): void
888-
{
889-
error_clear_last();
890-
$result = \is_executable($filename);
891-
if ($result === false) {
892-
throw FilesystemException::createFromPhpError();
893-
}
894-
}
895-
896-
897-
/**
898-
* Returns TRUE if the file named by filename was
899-
* uploaded via HTTP POST. This is useful to help ensure that a
900-
* malicious user hasn't tried to trick the script into working on
901-
* files upon which it should not be working--for instance,
902-
* /etc/passwd.
903-
*
904-
* This sort of check is especially important if there is any chance
905-
* that anything done with uploaded files could reveal their
906-
* contents to the user, or even to other users on the same
907-
* system.
908-
*
909-
* For proper working, the function is_uploaded_file needs
910-
* an argument like $_FILES['userfile']['tmp_name'], - the name of the uploaded
911-
* file on the client's machine $_FILES['userfile']['name'] does not work.
912-
*
913-
* @param string $filename The filename being checked.
914-
* @throws FilesystemException
915-
*
916-
*/
917-
function is_uploaded_file(string $filename): void
918-
{
919-
error_clear_last();
920-
$result = \is_uploaded_file($filename);
921-
if ($result === false) {
922-
throw FilesystemException::createFromPhpError();
923-
}
924-
}
925-
926-
927880
/**
928881
* Attempts to change the group of the symlink filename
929882
* to group.

generated/functionsList.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@
145145
'ftruncate',
146146
'fwrite',
147147
'glob',
148-
'is_executable',
149-
'is_uploaded_file',
150148
'lchgrp',
151149
'lchown',
152150
'link',
@@ -907,7 +905,6 @@
907905
'stream_filter_register',
908906
'stream_filter_remove',
909907
'stream_get_contents',
910-
'stream_is_local',
911908
'stream_isatty',
912909
'stream_resolve_include_path',
913910
'stream_set_blocking',

generated/stream.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -225,23 +225,6 @@ function stream_get_contents($handle, int $maxlength = -1, int $offset = -1): st
225225
}
226226

227227

228-
/**
229-
* Checks if a stream, or a URL, is a local one or not.
230-
*
231-
* @param mixed $stream_or_url The stream resource or URL to check.
232-
* @throws StreamException
233-
*
234-
*/
235-
function stream_is_local($stream_or_url): void
236-
{
237-
error_clear_last();
238-
$result = \stream_is_local($stream_or_url);
239-
if ($result === false) {
240-
throw StreamException::createFromPhpError();
241-
}
242-
}
243-
244-
245228
/**
246229
* Determines if stream stream refers to a valid terminal type device.
247230
* This is a more portable version of posix_isatty, since it works on Windows systems too.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
22
return [
33
'array_key_exists',
4+
'is_executable',
5+
'is_uploaded_file',
6+
'stream_is_local',
47
];

0 commit comments

Comments
 (0)