Looping back to login page when trying to get PDF

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 7
Joined: Tue Jan 25, 2005 6:23 pm
Location: Cupertino, Calif

Looping back to login page when trying to get PDF

Postby rsshaw » Fri Feb 04, 2005 3:11 pm

I encountered this on my OJS 1.1.8 test system and repeated it on the PKP demo system. The symptom is that when at a table of contents entry with a PDF link, clicking on the PDF link sends the browser to the login page. Logging in and returning to the TOC page and clicking any PDF link goes right back to logon - can't access the document.

This is almost certainly connected with the proxy server I normally use - when I bypass it, things will work (after a double logon if the proxy had just been being used).

The proxy is supplied by http://www.propel.com as an acceleration service provided by my dial-up ISP. I've been using this accelerator for over a year and have never seen a problem like this. I know the workaround, but accessors of my journal would be sorely inconvenienced if they ran into this.

By the way, the system is generally very nice - thanks for providing it.

Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby kevin » Fri Feb 04, 2005 6:12 pm

You may want to try disabling the IP address check in include/session.inc.php:

Code: Select all

@@ -73,7 +73,7 @@
        if($db->num_rows($result) != 0) {
                // check that IP of existing session matches
                list($session_ip) = $db->assoc_array($result);
-               if($session_ip != $ip) {
+               if(false && $session_ip != $ip) {
                        // invalid IP, redirect to login form

Posts: 7
Joined: Tue Jan 25, 2005 6:23 pm
Location: Cupertino, Calif

Postby rsshaw » Wed Feb 23, 2005 11:17 pm

The suggested patch does work around the problem; thanks. I haven't been able to figure out why the Propel accelerator proxy I'm using uses its own IP address on most requests but not on the PDF getdoc request, on which the users PC IP address is sent. I think it might be quirky or buggy.

A slight concern is that the patch disables the IP checking. This checking I presume is a security precaution; otherwise a cookie forgery could get access without a proper logon. Because of this, I have suggested a change to this code in Bugzilla #1251.

Return to “OJS Editorial Support and Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest