RobThree / TwoFactorAuth

PHP library for Two Factor Authentication (TFA / 2FA)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CURLOPT_FOLLOWLOCATION and open_basedir

jportoles opened this issue · comments

Hey, great work on the library, we've been testing it and it seems to be pretty robust. We ran into a minor issue and I'd like to propose a change:

Basically, BaseHTTPQRCodeProvider crashes if the open_basedir php directive is set, and it doesn't appear that a workaround exists:

http://stackoverflow.com/questions/19539922/php-can-curlopt-followlocation-and-open-basedir-be-used-together

And while "just turn the directive off" can be a solution for some, like the thread there suggests it can be a security liability to get rid of it. So I would vote to remove CURLOPT_FOLLOWLOCATION from the class, unless there's a compelling reason to keep it. Google Charts seems to work fine at least without redirects.

I don't have a problem with removing the CURLOPT_FOLLOWLOCATION option. On it.

Hurray, thanks! We were already running this change in a hacky way, but it's always nicer to have it in the upstream version.