You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2009-10-08 21:46:07

ertai
Member
Registered: 2009-10-08
Posts: 4

Login after failure doesn't redirect any more

When you login after a failure to login the login-page pushes you to the default startpage, even when it should be redirecting. I have changed code to fix this but i don't know where I can post it. Can anyone tell me this?

Offline

#2 2009-10-08 21:46:57

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Login after failure doesn't redirect any more


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2009-10-09 12:35:20

ertai
Member
Registered: 2009-10-08
Posts: 4

Re: Login after failure doesn't redirect any more

I verified the bug in the bugtrack. But the bug isn't there in English.. Maybe in French but I can't read French so I don't know for sure.

The GLPI's I tested are 0.72.2 and the nightly build of 08-10-2009 (Yesterday). I made clean installs of these versions and tested it. It isn't implemented in theses GLPI versions so the platforms don't matter.

I still have the code to fix it. with diffs from the nightly build of 08-10-2009. Where can I submit this code?

Offline

#4 2009-10-09 14:13:08

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Login after failure doesn't redirect any more

First you do not give us all needed informations to debug.

submit the diff here. We will see.


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#5 2009-10-09 20:59:16

ertai
Member
Registered: 2009-10-08
Posts: 4

Re: Login after failure doesn't redirect any more

login.php
218,225d217
<     // Redirect management
<         $REDIRECT = "";
<         if (isset ($_POST['redirect'])&&strlen($_POST['redirect'])>0){
<             $REDIRECT = "?redirect=" .$_POST['redirect'];
<     } else if (isset ($_GET['redirect'])&&strlen($_GET['redirect'])>0){
<             $REDIRECT = "?redirect=" .$_GET['redirect'];
<     }
<
234a227,234
>         // Redirect management
>         $REDIRECT = "";
>         if (isset ($_POST['redirect'])&&strlen($_POST['redirect'])>0){
>             $REDIRECT = "?redirect=" .$_POST['redirect'];
>         } else if (isset ($_GET['redirect'])&&strlen($_GET['redirect'])>0){
>             $REDIRECT = "?redirect=" .$_GET['redirect'];
>         }
>    
246,247c246,247
<             // Logout whit noAUto to manage auto_login with errors
<         echo '<b><a href="' . $CFG_GLPI["root_doc"] . '/logout.php?noAUTO=1'.str_replace("?","&",$REDIRECT).'">' . $LANG['login'][1] . '</a></b></div>';
---
>       // Logout whit noAUto to manage auto_login with errors
>         echo '<b><a href="' . $CFG_GLPI["root_doc"] . '/logout.php?noAUTO=1">' . $LANG['login'][1] . '</a></b></div>';

logout.php
54,64d53
< // Redirect management
< $REDIRECT = "";
< if (isset ($_POST['redirect'])&&strlen($_POST['redirect'])>0){
<         $REDIRECT.= "redirect=" .$_POST['redirect'];
< } else if (isset ($_GET['redirect'])&&strlen($_GET['redirect'])>0){
<         $REDIRECT.= "redirect=" .$_GET['redirect'];
< }
< if ($REDIRECT <> "") {
<     $REDIRECT = ($noAUTO=="")?"?":"&";
< }
<
70c59
< glpi_header($CFG_GLPI["root_doc"]."/index.php".$noAUTO.$REDIRECT);
---
> glpi_header($CFG_GLPI["root_doc"]."/index.php".$noAUTO);

Offline

#6 2009-10-13 21:05:45

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Login after failure doesn't redirect any more

Thanks for the patch.
I integrate it. You could see ticket here : https://forge.indepnet.net/issues/show/1864

I close


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

Board footer

Powered by FluxBB