Also, it would be good to know how the user managed to get a space there - AFAIK we strip surrounding whitespace everywhere, so if there’s a way to create an indico account with surrounding whitespace in the username that’d be a bug.
I don’t know what happened from the user side, so, I’m sorry, I cannot say anything about that.
This is what I have done on the Indico server:
[root@indico ~]# su - indico
Last login: Fri Oct 30 11:48:29 CET 2020 on pts/0
[indico@indico ~]$ source ~/.venv/bin/activate
(.venv)[indico@indico ~]$ indico shell
^[[A^[[A^[[A/opt/indico/.venv/lib/python2.7/site-packages/indico/core/logger.py:112: UserWarning: Logging config file not found; using defaults. Copy /opt/indico/.venv/lib/python2.7/site-packages/indico/logging.yaml.sample to /opt/indico/etc/logging.yaml to get rid of this warning.
^[[A^[[A^[[B^[[B^[[A^[[AIndico v2.3 is ready for your commands
In : identity = Identity.query.filter_by(identifier='name surname').first()
In : identity.identifier = identity.identifier.strip()
In : db.session.commit()
In : exit
(.venv)[indico@indico ~]$ exit
[root@indico ~]# systemctl restart uwsgi.service httpd.service indico-celery.service
But now, from the Indico web interface, on the user account window, the “Modify credentials” button is disabled.
The username field is always the same: “name surname” (without double quotes).
umm I think we are mixing up things… spaces in the middle of the username should be ok; I thought you were talking about a space at the end of the username - strip() only removes surrounding whitespace.
Maybe look at the identity.identifier and make sure the user users that when logging in…
Thank you ThiefMaster,
I asked the user to perform a password reset.
In the meantime I noticed that the username field has changed to name.surname (the modification I made previously).
It seems the modification of the identifier succeeded but with a delay.
I will report you more details as soon as possible.
In the mean time, thank you for your hints.
There is no such delay on the indico side. However, if your just refreshed the page your browser may have kept the old form data. CTRL+F5 or simply navigating away and then to correct page again avoids this.