Mailing List Archive

Trac 1.4, User login failing
Hello everybody,


we have a user that cannot login anymore. I can't reproduce the issue with
my own login. We have reset the password of the user, but the issue remains.
Login is failing like this:

2020-08-17 09:28:26,327 Trac[main] ERROR: [10.190.226.172] Internal Server
Error: <RequestWithSession "POST '/login'">, referrer 'http://trac/pp/login'
Traceback (most recent call last):
File
"/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/web/main.py",
line 639, in dispatch_request
dispatcher.dispatch(req)
File
"/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/web/main.py",
line 250, in dispatch
resp = chosen_handler.process_request(req)
File
"/mnt/data/trac/.local/lib64/python2.7/site-packages/acct_mgr/web_ui.py",
line 535, in process_request
"(release_time)s", release_time=release_time)
File
"/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
, line 295, in <lambda>
return lambda *args, **kw: _functions[symbol](domain, *args, **kw)
File
"/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
, line 209, in dgettext
return _dgettext()
File
"/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
, line 206, in _dgettext
return safefmt(self.active.dugettext(domain, string), kwargs)
File
"/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
, line 31, in safefmt
return string % kwargs
ValueError: unsupported format character '(' (0x28) at index 41

What can we do?

Best regards.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/593ca46c-60ca-4187-a65a-6efe347de8c3o%40googlegroups.com.
Re: Trac 1.4, User login failing [ In reply to ]
Hi ,

Look at the error, unspotted character. He might has a pw that can't be
read, so he might like to try one without some strange special chars like (
. All those bad choices anyway since they are part of the programming
language syntax and might need to be escaped.

Cheers

Markus



Mo <burcheri.massimo@gmail.com> schrieb am Mo., 17. Aug. 2020, 10:11:

> Hello everybody,
>
>
> we have a user that cannot login anymore. I can't reproduce the issue with
> my own login. We have reset the password of the user, but the issue remains.
> Login is failing like this:
>
> 2020-08-17 09:28:26,327 Trac[main] ERROR: [10.190.226.172] Internal Server
> Error: <RequestWithSession "POST '/login'">, referrer '
> http://trac/pp/login'
> Traceback (most recent call last):
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/web/main.py",
> line 639, in dispatch_request
> dispatcher.dispatch(req)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/web/main.py",
> line 250, in dispatch
> resp = chosen_handler.process_request(req)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/acct_mgr/web_ui.py",
> line 535, in process_request
> "(release_time)s", release_time=release_time)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 295, in <lambda>
> return lambda *args, **kw: _functions[symbol](domain, *args, **kw)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 209, in dgettext
> return _dgettext()
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 206, in _dgettext
> return safefmt(self.active.dugettext(domain, string), kwargs)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 31, in safefmt
> return string % kwargs
> ValueError: unsupported format character '(' (0x28) at index 41
>
> What can we do?
>
> Best regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/593ca46c-60ca-4187-a65a-6efe347de8c3o%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/593ca46c-60ca-4187-a65a-6efe347de8c3o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJ4osO%3Duq1u_AiWqaMs8AVunTOrpW-Mxb-2JaTnfR1Qpk51WPw%40mail.gmail.com.
Re: Trac 1.4, User login failing [ In reply to ]
On Monday, August 17, 2020 at 1:11:00 AM UTC-7 Mo wrote:

> Hello everybody,
>
>
> we have a user that cannot login anymore. I can't reproduce the issue with
> my own login. We have reset the password of the user, but the issue remains.
> Login is failing like this:
>
> 2020-08-17 09:28:26,327 Trac[main] ERROR: [10.190.226.172] Internal Server
> Error: <RequestWithSession "POST '/login'">, referrer '
> http://trac/pp/login'
> Traceback (most recent call last):
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/web/main.py",
> line 639, in dispatch_request
> dispatcher.dispatch(req)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/web/main.py",
> line 250, in dispatch
> resp = chosen_handler.process_request(req)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/acct_mgr/web_ui.py",
> line 535, in process_request
> "(release_time)s", release_time=release_time)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 295, in <lambda>
> return lambda *args, **kw: _functions[symbol](domain, *args, **kw)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 209, in dgettext
> return _dgettext()
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 206, in _dgettext
> return safefmt(self.active.dugettext(domain, string), kwargs)
> File
> "/mnt/data/trac/.local/lib64/python2.7/site-packages/trac/util/translation.py"
> , line 31, in safefmt
> return string % kwargs
> ValueError: unsupported format character '(' (0x28) at index 41
>
> What can we do?
>
> Best regards.
>

The issue occurs in this block of code, which has a syntax error:
if release_time is not None:
data['login_error'] = \
_("Account locked, please try again after "
"%(release_time)s", release_time=release_time)

You can probably solve the issue by unlocking the user's account.

The syntax error is fixed in:
https://trac-hacks.org/changeset/17839

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a73de127-4160-4525-abd6-35fc605fdf6bn%40googlegroups.com.