Subject: [CODE4LIB] EzProxy and recaptcha

From: "Walker, David" <[email-masked]>
Date: Tue, 25 Aug 2009 12:33:38 -0700

Casting a net far and wide on this, sorry.

We're using EZproxy to proxy a website that also happens to have reCaptcha on it.  

I guess reCaptcha keys are tied to domain names, so when the Javascript is brought into the page via the <script /> tag, it sees that the page is 'proxy.example.edu' instead of 'www.vendorsite.com', and we end-up with an error from reCaptcha saying:

   This reCAPTCHA key isn't authorized for the given domain.

That all makes sense.  But can anyone fathom a workaround?

--Dave

==================
David Walker
Library Web Services Manager
California State University
http://xerxes.calstate.edu

---

From: "Bertram, Albert" <[email-masked]>
Date: Tue, 25 Aug 2009 16:08:45 -0400

Hi Dave,

Is this something that can be done using Find/Replace with the ^A modifier?

Find NAME="_PRIORREFERER" VALUE="http://
Replace NAME="_PRIORREFERER" VALUE="http://^A

The documentation says it only works after http:// or https://,  so it may not work if you're only passing the hostname around.

http://pluto.potsdam.edu/ezproxywiki/index.php/Find_And_Replace
http://www.oclc.org/us/en/support/documentation/ezproxy/cfg/find/
http://www.oclc.org/support/documentation/ezproxy/db/lexisnexis.htm

Cheers,

Albert

________________________________________
From: Code for Libraries [[email-masked]] On Behalf Of Walker, David [[email-masked]]
Sent: Tuesday, August 25, 2009 3:33 PM
To: [email-masked]
Subject: [CODE4LIB] EzProxy and recaptcha

--Dave

==================
David Walker

---

From: "Wick, Ryan" <[email-masked]>
Date: Tue, 25 Aug 2009 13:22:42 -0700

reCAPTCHA keys are tied to a domain name by default, but they also offer
global keys. From an admin page:

If you wish to use your key across a large number of domains (e.g., if
you are a hosting provider, OEM, etc.), select the global key option.
You may want to use a descriptive domain name such as
"global-key.mycompany.com" 

Ryan Wick
Information Technology Consultant
Special Collections
Oregon State University Libraries
http://osulibrary.oregonstate.edu/specialcollections

-----Original Message-----
From: Code for Libraries [mailto:[email-masked]] On Behalf Of
Walker, David
Sent: Tuesday, August 25, 2009 12:34 PM
To: [email-masked]
Subject: [CODE4LIB] EzProxy and recaptcha

We're using EZproxy to proxy a website that also happens to have
reCaptcha on it.  

I guess reCaptcha keys are tied to domain names, so when the Javascript
is brought into the page via the <script /> tag, it sees that the page
is 'proxy.example.edu' instead of 'www.vendorsite.com', and we end-up
with an error from reCaptcha saying:

--Dave

==================
David Walker

---

From: "Walker, David" <[email-masked]>
Date: Tue, 25 Aug 2009 14:10:33 -0700

> Find/Replace with the ^A modifier?

I don't think so, after reading the documentation.  But thank you for those links, Albert, I really appreciate it.

I think the ultimate issue is that, when the browser fetches the recaptcha Javascript, it sends a referrer that says this is from my proxy server instead of the vendor site.

So, unless EZProxy is set-up to manipulate the HTTP referrer header -- which I'm thinking is unlikely if not impossible -- then it's not something we can fix on the EZproxy side.

--Dave

==================
David Walker
Library Web Services Manager
California State University
http://xerxes.calstate.edu
________________________________________
From: Code for Libraries [[email-masked]] On Behalf Of Bertram, Albert [[email-masked]]
Sent: Tuesday, August 25, 2009 1:08 PM
To: [email-masked]
Subject: Re: [CODE4LIB] EzProxy and recaptcha

Hi Dave,

Cheers,

Albert

--Dave

==================
David Walker

---

From: "Walker, David" <[email-masked]>
Date: Tue, 25 Aug 2009 14:13:09 -0700

I'm thinking this may be the only solution.  I will mention it to the vendor, Ryan, thanks!

--Dave
==================
David Walker
Library Web Services Manager
California State University
http://xerxes.calstate.edu
________________________________________
From: Code for Libraries [[email-masked]] On Behalf Of Wick, Ryan [[email-masked]]
Sent: Tuesday, August 25, 2009 1:22 PM
To: [email-masked]
Subject: Re: [CODE4LIB] EzProxy and recaptcha

Ryan Wick

-----Original Message-----

--Dave

==================
David Walker

---

From: "Walker, David" <[email-masked]>
Date: Tue, 25 Aug 2009 21:04:07 -0700

So I return to the lists here somewhat sheepishly to admit that the problem was solved simply by adding the reCaptcha domain to our EZproxy stanza with the magic Javascript directives:

  DJ recaptcha.net
  HJ recaptcha.net

One of those must, I'm guessing, fetch the reCaptcha Javascript without an HTTP referrer, or possible even using the original vendor site's domain in the referrer, since that's the only way it will work.  Either way, solved our problem.

ezproxy++

--Dave

==================
David Walker
Library Web Services Manager
California State University
http://xerxes.calstate.edu
________________________________________
From: Walker, David
Sent: Tuesday, August 25, 2009 12:33 PM
To: [email-masked]
Cc: [email-masked]
Subject: EzProxy and recaptcha

--Dave

==================
David Walker