Getting an Undefined index: QUERY_STRING when logging in

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

Bug Description

If trying to access a page requiring login the system remembers the path (QUERY_STRING) you were trying to access. So when login is successful it will redirect to that page.

But if you login from the homepage there can be no QUERY_STRING to redirect to

Noticed when doing behat tests

Robert Lyon (robertl-9)
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

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

commit 1c3d039b0f7c57cfe57410e510293e8d7cdd1d19
Author: Robert Lyon <email address hidden>
Date: Thu May 31 13:44:27 2018 +1200

Bug 1774309: Only redirect with QUERY_STRING when it exists

If trying to access a page requiring login the system remembers the
path (QUERY_STRING) you were trying to access when login is successful

But if you login from the homepage there can be no QUERY_STRING set

Noticed when doing behat tests

behatnotneeded

Change-Id: I38cf1f6df7432d70ced5fe5df84bd56b47f1f163
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/8931

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

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

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

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

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

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

commit 58fe82f88173cb129b64890a3982586245217a84
Author: Robert Lyon <email address hidden>
Date: Thu May 31 13:44:27 2018 +1200

Bug 1774309: Only redirect with QUERY_STRING when it exists

If trying to access a page requiring login the system remembers the
path (QUERY_STRING) you were trying to access when login is successful

But if you login from the homepage there can be no QUERY_STRING set

Noticed when doing behat tests

behatnotneeded

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

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

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

commit ea361fcc6cb3beb31741adfab74e84ec1e186762
Author: Robert Lyon <email address hidden>
Date: Thu May 31 13:44:27 2018 +1200

Bug 1774309: Only redirect with QUERY_STRING when it exists

If trying to access a page requiring login the system remembers the
path (QUERY_STRING) you were trying to access when login is successful

But if you login from the homepage there can be no QUERY_STRING set

Noticed when doing behat tests

behatnotneeded

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

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

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

commit 6f4f15a5cfa169f6acf798bbd1826e91d125b86b
Author: Robert Lyon <email address hidden>
Date: Thu May 31 13:44:27 2018 +1200

Bug 1774309: Only redirect with QUERY_STRING when it exists

If trying to access a page requiring login the system remembers the
path (QUERY_STRING) you were trying to access when login is successful

But if you login from the homepage there can be no QUERY_STRING set

Noticed when doing behat tests

behatnotneeded

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

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
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