Comments (8)
I tested this in dev-2_4 with rewrites of:
RewriteEngine On
RewriteCond %{REQUEST_URI} !/index.php/
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^/index/(.*)$ /index.php/index/$1 [L]
RewriteCond %{REQUEST_URI} !/index.php/
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^(.*)$ /index.php/testjournal$1 [L]
and a config.inc.php of:
base_url = "http://my.test.journal/index"
base_url[testjournal] = "http://my.test.journal/"
and either force_ssl
or force_login_ssl
set to On
.
My experience verifies the issue. I haven't gotten down to the cause or fix yet.
from pkp-lib.
Why would protocol redirects (https://github.com/pkp/pkp-lib/blob/ojs-dev-2_4/classes/core/PKPRequest.inc.php#L108 and https://github.com/pkp/pkp-lib/blob/ojs-dev-2_4/classes/core/PKPRequest.inc.php#L120) allow for the redirect to be anything other than $_SERVER['REQUEST_URI] with $_SERVER['QUERY_STRING'] appended?
from pkp-lib.
Dne 12. 1. 2015 21:43 "Clinton Graham" [email protected] napsal(a):
Why would protocol redirects (
https://github.com/pkp/pkp-lib/blob/ojs-dev-2_4/classes/core/PKPRequest.inc.php#L108
and
https://github.com/pkp/pkp-lib/blob/ojs-dev-2_4/classes/core/PKPRequest.inc.php#L120)
allow for the redirect to be anything other than $_SERVER['REQUEST_URI]
with $_SERVER['QUERY_STRING'] appended?
I guess that REQUEST_URI is at this moment already remapped to a stateful
URI by simply taking everything after index.php in the original request.
It is just a guess though, I would have to test it (and I will, but
probably not sooner than on Thursday).
I am just wondering whether plain HTTP redirects work in my setup, as the
code for both redirects is almost the same. Also something I will have to
test...
-- Jan
from pkp-lib.
Possible URI variants include:
- index.php + querystring
- index.php + PATH_INFO
- mod_rewrite RESTful URL
Regardless of the above cases, I think the REQUEST_URI should be preserved on a protocol redirect.
In OJS 2.4.5, protocol redirects seem to be limited to:
- Login:
- Post login:
- HTTPS Policy:
That set still makes me think that the redirect should be based on REQUEST_URI and not on the URI variants. We're really just changing the protocol, not reconstructing the request. I haven't looked at OJS master, or the other PKP products which share lib-pkp, so I'm hoping one of the PKP devs with more experience can chime in.
from pkp-lib.
Thanks for the detailed investigation, @ctgraham and @jprk -- Clinton, your list of redirects looks correct to me.
The reasons for not using REQUEST_URI are lost in the mists of time, but I suspect it has something to do with that variable not always being available/accurate -- http://stackoverflow.com/questions/12772846/how-reliable-is-serverrequest-uri-at-capturing-query-strings rings a bell for me. This now looks to be a non-issue, however, so I think using REQUEST_URI in these few cases makes a lot of sense.
from pkp-lib.
(There are probably lots of general opportunities to introduce the use of protocol-relative URLs, by the way.)
from pkp-lib.
Merged, thanks!
from pkp-lib.
Also cherry-picked to pkp-lib omp-dev-1_1 and master branches.
from pkp-lib.
Related Issues (20)
- Accessiblity Features for Plugin Gallery
- API for retrieving files uploaded by reviewer
- API for retrieving submission files with Reviewer role
- Enhance submission schema with review assignment data HOT 1
- Issue titles double-escaped HOT 1
- Bring in Laravel's Blade Templating Engine.
- [OMP 3.4.0] Add AuthorForm class HOT 1
- VS Code Error due parsing too many files HOT 3
- Improve current e2e tests reliability HOT 3
- Validation failures for submission file upload break the UI
- Display Galley language in the grid HOT 6
- Make easier to check for success when using useFetch HOT 3
- Upgrade OJS 2.4.8-4 to 3.2.1-4: Error when change datatype of email subject to TEXT HOT 1
- Scheduled task cannot open log file HOT 1
- Extend "tools/install.php" for unattended installations
- Cancelling a submission upload doesn't remove it
- Fatal exception when setting a notification as not read
- Exception when inputting large texts into short fields HOT 2
- In OJS, when a user has been assigned to an issue as a reviewer once, he/she cannot search by author name anymore.
- Unknown column 'et.alternate_to' in 'field list' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pkp-lib.