Actions
Regression #13685
closedURL alias parsing is broken, gets stuck in infinite loop reading downloaded file
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
23.01
Release Notes:
Force Exclusion
Affected Version:
Affected Architecture:
Description
In c239afac1763951eacefc1dbc59ad04f9d319b91 we made the following change:
- while (($fc = fgetss($fd)) !== FALSE) {
+ while (($fc = strip_tags(fgets($fd))) !== FALSE) {
However, this is not an equivalent result because the output of strip_tags()
will never be FALSE, it will return an empty string when fed boolean FALSE. Because of that difference, execution can never break out of this loop, so creating or updating URL-based aliases will spin forever until PHP times out.
This is the only place in the code base that used that combination, so it's the only place affected.
Changing the code so it performs the strip_tags()
inside the loop works:
while (($fc = fgets($fd)) !== FALSE) {
$fc = strip_tags($fc);
Related issues
Actions