Modify

Opened 5 weeks ago

Closed 5 weeks 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)

Change History (1)

comment:1 Changed 5 weeks ago by Jun Omae

Resolution: fixed
Status: assignedclosed

In 18668:

TracAccountManager 0.6.1dev: fix verification token being a bytes instance (closes #14362)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.