Modify ↓
Opened 37 hours ago
Closed 36 hours ago
#14362 closed defect (fixed)
Verification token on registration should be a str instance
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.6 |
Description
I received account email verification like the following. The token in the email seems to be a bytes instance.
Please visit the following URL to confirm your email address. Verification URL: <https://example.org/verify_email?token=b'weJg5Ks7'&verify=1> Username: jun66j5 Verification Token: b'weJg5Ks7' -- Trac <https://example.org> Trac
It is generated from _gen_token
method in acct_mgr/register.py
.
639 def _gen_token(self): 640 return base64.urlsafe_b64encode(os.urandom(6))
Python 3.8.10 (default, Sep 11 2024, 16:02:53) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import base64, os >>> base64.urlsafe_b64encode(os.urandom(6)) b'weJg5Ks7' >>>
Attachments (0)
Note: See
TracTickets for help on using
tickets.
In 18668: