[php-src] Issue #8441: max_execution_time does not take effect in crypt function.
| From: | alexlongguo | Date: | Tue, 26 Apr 2022 07:09:28 +0000 |
| Subject: | [php-src] Issue #8441: max_execution_time does not take effect in crypt function. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-241240@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8441
Comment Author: alexlongguo
> You're compiling a custom PHP for this? Why?
>
> I think I know what you're reporting: if max_execution_time is reached while crypt() is
> running then it will not abort, and only when the function returns will PHP finally report the
> timeout.
>
> So this file
>
> ```
> <?php
>
> set_time_limit(1);
> crypt('This is just a test', '$5$rounds=999999999$asaltof16chars..');
> echo 'This should not be outputted';
>
> ?>
> ```
>
> will take (a lot) more than 1 second.
>
> Is that correct?
yes,Is there any way to make the time limit take effect?
I compile a private php program to detect malicious php files, but some malicious files will use the
crypt function to make the php program block, so I set a time limit in my private php program, but
it doesn't work