Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

#12631 closed defect (fixed)

session add command is inconsistent with user preferences when name and email are empty string

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.14
Component: admin/console Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:

Don't create session_attribute records if empty string is passed to session add and session set commands.

API Changes:
Internal Changes:

Description

If name and email are saved with empty string, no session_attribute records are created for name and email. However, session add and session set command with empty string create session_attribute records with empty value.

I think we should remove session_attribute records if name and email are empty.

Trac [/dev/shm/tracenv]> session list

SID  Auth  Last Visit  Name  Email
----------------------------------

Trac [/dev/shm/tracenv]> session add blah:1
Trac [/dev/shm/tracenv]> session add blah-with-empty-values:1 '' ''
Trac [/dev/shm/tracenv]> session list

SID                     Auth  Last Visit  Name  Email
-----------------------------------------------------
blah                    1     2016-12-05
blah-with-empty-values  1     2016-12-05

Trac [/dev/shm/tracenv]>
$ sqlite3 /dev/shm/tracenv/db/trac.db
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .nullvalue <NULL>
sqlite> SELECT NULL;
<NULL>
sqlite> .header on
sqlite> .mode column
sqlite> SELECT * FROM session_attribute;
sid                     authenticated  name        value
----------------------  -------------  ----------  ----------
blah-with-empty-values  1              name
blah-with-empty-values  1              email

Attachments (0)

Change History (4)

comment:1 by Ryan J Ollos, 7 years ago

Summary: session add command is inconsistent with user prefereneces when name and email are empty stringsession add command is inconsistent with user preferences when name and email are empty string

comment:2 by Jun Omae, 7 years ago

Milestone: next-stable-1.0.x1.0.14
Owner: set to Jun Omae
Status: newassigned

Proposed changes in [ee9679355/jomae.git].

comment:3 by Ryan J Ollos, 7 years ago

Changes look good to me.

comment:4 by Jun Omae, 7 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Thanks. Committed in [15293] and merged in [15294-15295].

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'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.