Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integer env parsing in rcube_config.php possibly broken #8293

Closed
gutmensch opened this issue Nov 6, 2021 · 1 comment
Closed

integer env parsing in rcube_config.php possibly broken #8293

gutmensch opened this issue Nov 6, 2021 · 1 comment

Comments

@gutmensch
Copy link

I have an environment variable exposed to roundcube called

ROUNDCUBE_MANAGESIEVE_PORT=4190

This results in an endless parsing loop in https://github.com/roundcube/roundcubemail/blame/master/program/lib/Roundcube/rcube_config.php with the detected values and parameters from parse_env and guess_type being always

[06-Nov-2021 12:26:21 UTC] 4190
[06-Nov-2021 12:26:21 UTC] float
[06-Nov-2021 12:26:21 UTC] float

One reason seems to be that the order of float and integer detection in guess_type seems wrong, the float regex also matches integers (see screenshot), so probably integer should be checked first. The other reason is maybe that parse_env enters a recursion because it never returns for a float value, only for double. Was that missed in some earlier change from float to double?!

Screenshot 2021-11-06 at 13 31 24

Thanks anyway for the great project and keep up the good work!
Cheers,
Robert

@alecpl
Copy link
Member

alecpl commented Nov 6, 2021

Fixed.

@alecpl alecpl closed this as completed Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants