Redirecting to wrong adminurl post login

Bug #1774334 reported by james william
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
17.04
Fix Released
High
Unassigned
17.10
Fix Released
High
Unassigned
18.04
Fix Released
High
Unassigned
18.10
Fix Released
High
Unassigned

Bug Description

Hi,

I have installed Mahara 18041 manually on one of my test servers. However I am getting stuck post admin login.

After installing Mahara 18041 when I try to login into http://{domain.com}/{subdirectory}/admin it is redirecting to http://{domain.com}/{subdirectory}/ {subdirectory} /admin which is giving "404 Not found" error as it is detecting {subdirectory} twice.

Can anyone help me out why this is happening ?

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8943

Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi James,

The reason for this is your site is subdirectory of the website's root directory.

This is indeed a bug, and it is being caused by:
PHP SCRIPT_NAME = /{subdirectory}/admin
Mahara wwwroot = http://{domain.com}/{subdirectory}/

And so there is an overlap of /{subdirectory} common to both parts, where we only need it once

I've created a patch for it https://reviews.mahara.org/#/c/8943/

Please try the changes in that patch to see if fixes your problem.

Cheers

Robert

Changed in mahara:
milestone: none → 18.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8943
Committed: https://git.mahara.org/mahara/mahara/commit/d9ce7d924f086358a27e00bd99138faddbb75e7a
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit d9ce7d924f086358a27e00bd99138faddbb75e7a
Author: Robert Lyon <email address hidden>
Date: Wed Jun 6 09:29:20 2018 +1200

Bug 1774334: Correcting redirect on login for site in subdirectory

The fix in Bug 1774309 fails to work correctly when the site
is in a subdirectory of the apache root.

To test:
1) Adjust your site's apache file and set the DocumentRoot to be
parent of htdocs
2) Change the 'wwwroot' db value for site to include the 'htdocs/' bit
3) Restart the apache server
4) Go to site, adding 'htdocs/' to url
5) Try logging in

before patch: end up not found page with url containing two 'htdocs/'

after patch: end up at correct place

behatnotneeded

Change-Id: Ic5e1de2c5edaf96bbdd9b2403f0f65e45a4b80c0
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "18.04_STABLE" branch: https://reviews.mahara.org/8944

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/8945

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/8946

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8945
Committed: https://git.mahara.org/mahara/mahara/commit/6bf2073b4193ade7587e8d29f7885025c3682632
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit 6bf2073b4193ade7587e8d29f7885025c3682632
Author: Robert Lyon <email address hidden>
Date: Wed Jun 6 09:29:20 2018 +1200

Bug 1774334: Correcting redirect on login for site in subdirectory

The fix in Bug 1774309 fails to work correctly when the site
is in a subdirectory of the apache root.

To test:
1) Adjust your site's apache file and set the DocumentRoot to be
parent of htdocs
2) Change the 'wwwroot' db value for site to include the 'htdocs/' bit
3) Restart the apache server
4) Go to site, adding 'htdocs/' to url
5) Try logging in

before patch: end up not found page with url containing two 'htdocs/'

after patch: end up at correct place

behatnotneeded

Change-Id: Ic5e1de2c5edaf96bbdd9b2403f0f65e45a4b80c0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit d9ce7d924f086358a27e00bd99138faddbb75e7a)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8944
Committed: https://git.mahara.org/mahara/mahara/commit/12432166751b1d8077030d9cf844190c5823d994
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.04_STABLE

commit 12432166751b1d8077030d9cf844190c5823d994
Author: Robert Lyon <email address hidden>
Date: Wed Jun 6 09:29:20 2018 +1200

Bug 1774334: Correcting redirect on login for site in subdirectory

The fix in Bug 1774309 fails to work correctly when the site
is in a subdirectory of the apache root.

To test:
1) Adjust your site's apache file and set the DocumentRoot to be
parent of htdocs
2) Change the 'wwwroot' db value for site to include the 'htdocs/' bit
3) Restart the apache server
4) Go to site, adding 'htdocs/' to url
5) Try logging in

before patch: end up not found page with url containing two 'htdocs/'

after patch: end up at correct place

behatnotneeded

Change-Id: Ic5e1de2c5edaf96bbdd9b2403f0f65e45a4b80c0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit d9ce7d924f086358a27e00bd99138faddbb75e7a)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8946
Committed: https://git.mahara.org/mahara/mahara/commit/58ae4b333ba3553b824c6afe0725e4ad94be03a9
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit 58ae4b333ba3553b824c6afe0725e4ad94be03a9
Author: Robert Lyon <email address hidden>
Date: Wed Jun 6 09:29:20 2018 +1200

Bug 1774334: Correcting redirect on login for site in subdirectory

The fix in Bug 1774309 fails to work correctly when the site
is in a subdirectory of the apache root.

To test:
1) Adjust your site's apache file and set the DocumentRoot to be
parent of htdocs
2) Change the 'wwwroot' db value for site to include the 'htdocs/' bit
3) Restart the apache server
4) Go to site, adding 'htdocs/' to url
5) Try logging in

before patch: end up not found page with url containing two 'htdocs/'

after patch: end up at correct place

behatnotneeded

Change-Id: Ic5e1de2c5edaf96bbdd9b2403f0f65e45a4b80c0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit d9ce7d924f086358a27e00bd99138faddbb75e7a)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.