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
let LJ::OpenID use the paranoid user agent on dev servers #1468
Comments
I think the only argument in favor might be that in a dev environment, you might actually want to access a URL that resolves to a private IP, if that's where you happen to be hosting a test site. On Jun 29, 2015, at 3:28 PM, Jen notifications@github.com wrote:
|
We might want to make that a user-configurable option instead of the default, then. |
Hmm that's a good point -- but I think it makes sense to have it be something you turn on (or even just something we add when / if we ever need it) than having it magically happen behind the scenes. |
We could just change the existing check for IS_DEV_SERVER to check for a config option instead, maybe call it SKIP_PARANOID_UA? |
I would suggest USERAGENT instead of UA but otherwise I'm fine with those
|
…_SERVER For certain LJ::OpenID functions that require a UserAgent object, use LWP::UserAgent::Paranoid instead of the default LWP::UserAgent, unless $LJ::SKIP_PARANOID_USERAGENT is enabled in the site config. Fixes dreamwidth#1468.
This removes the IS_DEV_SERVER special casing that resulted in the paranoid useragent only being used in production for some functions of LJ::OpenID. The bypass for the blocked_hosts check is left intact as a comment, in case it is needed for testing purposes at a later date. Fixes dreamwidth#1468.
[#1468] let LJ::OpenID always use the paranoid useragent
Related to #1418: when we switched modules from LWPx::ParanoidAgent to LWP::UserAgent::Paranoid, there were some API changes which made it to the live site undetected because LJ::OpenID does not use the paranoid user agent on dev servers. The error was fixed in #1460, but in the future, I believe such heartache could be avoided if we removed the dev server special casing. The split dates from LJ days and I haven't seen any good arguments in favor of keeping it.
The text was updated successfully, but these errors were encountered: