#671644 Password changed due to session/cookie problem

Package:
sympa
Source:
sympa
Description:
Modern mailing list manager
Submitter:
Daniel Pocock
Date:
2018-12-19 07:39:08 UTC
Severity:
important
#671644#5
Date:
2012-05-05 15:21:13 UTC
From:
To:
I've just installed sympa as a fresh install

I go to the web interface, click the `First login' link and type my
email address

I receive the ticket email and click the link

I enter a password in both boxes

Instead of creating the new account, wws gives me this error:

   "ERROR (setpasswd) - You need to login"

I notice there is nothing in the user_table:

mysql> select * from user_table;
Empty set (0.00 sec)

but there are entries in the one_time_ticket_table:

mysql> select * from one_time_ticket_table;
+------------------------+-------------------------+-------------------------------+----------------------+----------------------+-----------------------------+------------------------+
| ticket_one_time_ticket | robot_one_time_ticket   |
email_one_time_ticket         | date_one_time_ticket |
data_one_time_ticket | remote_addr_one_time_ticket |
status_one_time_ticket |
+------------------------+-------------------------+-------------------------------+----------------------+----------------------+-----------------------------+------------------------+

(suppressed)

+------------------------+-------------------------+-------------------------------+----------------------+----------------------+-----------------------------+------------------------+
1 rows in set (0.00 sec)


I also tried manually creating an entry in user_table with an INSERT
statement, and if I try to log in, I get the error:

  ERROR () - Provided password is incorrect ERROR (setpasswd) - You need
to login

#671644#10
Date:
2012-05-05 15:46:50 UTC
From:
To:
Some further detail, I found this in the log:


May  5 16:24:09 myhost1 wwsympa[24414]: err Robot::new() Missing
directory '/var/lib/sympa/lists.lumicall.org' for robot 'lists.lumicall.org'

and I believe it relates to bug #639627
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639627

I manually fixed that in /usr/share/sympa/lib/Sympa/Constants.pm but I
was still getting the same error.

Therefore, I went into /var/lib/sympa and create symlinks, e.g.

 ln -s /var/lib/sympa/list_data/lists.example.org /var/lib/sympa

and the error is gone, but the registration process still fails with
exactly the same error.  I then noticed other things about session
cookies in the logs:



May  5 16:32:38 myhost1 wwsympa[24868]: info SympaSession::new()
SympaSession::new ignoring unknown session cookie '82128592778522'
May  5 16:32:38 myhost1 wwsympa[24868]: info [robot lists.lumicall.org]
[session 47269562008511] [client 1.2.3.4] main::do_ticket()
do_ticket(65268126659593)
May  5 16:32:38 myhost1 wwsympa[24868]: info Auth::get_one_time_ticket()
xxxx Auth::get_one_time_ticket(65268126659593) : result : success
May  5 16:32:38 myhost1 wwsympa[24868]: info [robot lists.lumicall.org]
[session 47269562008511] [client 1.2.3.4] [user daniel@lvdx.com]
main::do_choosepasswd() do_choosepasswd
May  5 16:32:44 myhost1 wwsympa[24868]: info SympaSession::new()
SympaSession::new ignoring unknown session cookie '82128592778522'
May  5 16:32:44 myhost1 wwsympa[24868]: err [robot lists.lumicall.org]
[session 27176982911479] [client 1.2.3.4]
main::check_action_parameters() user not logged in
May  5 16:32:44 myhost1 wwsympa[24868]: info [robot lists.lumicall.org]
[session 27176982911479] [client 1.2.3.4] main::do_loginrequest()
do_loginrequest


Checking my browser, I discovered two sympa cookies, one with a dot
prefixed on the domain, e.g.

cookie 1 domain = lists.lumicall.org
cookie 2 domain = .lists.lumicall.org

I deleted both cookies and was then able to complete the registration
successfully

I have cookie_domain set in my robot.conf:

  cookie_domain lists.lumicall.org

and I don't know if that has caused the problem, or if one of the
cookies was somehow created before I set cookie_domain

However, I think that the wwsympa UI needs to be more tolerant of bad
cookies, it should clear them from the browser rather than expecting the
user to figure this out.

#671644#29
Date:
2018-12-02 09:11:43 UTC
From:
To:
Hello Daniel,

sorry for the very, very late answer to your bug report.

This problem still exists in current Sympa and I actually suspect that you are correct and this a problem with
Cookie handling.

It actually results in *changing* the current password.

Regards
        Racke