Not a bug actually, but minor optimization feature.

loginticket.module, string 68-69, query:
SELECT * FROM {loginticket} WHERE passcode_md5 = '%s' AND purpose = '%s'
but passcode_md5 is PRIMARY KEY for loginticket table, so it is unique and second part of sql query condition is obsolete.

Comments

jpetso’s picture

Hm... actually, I think that passcode_md5 and purpose should probably make up the primary key together, as the purposes (say, different API users) should be completely independent from each other. Well, just one reason more to replace passcode_md5 by a "real" incrementing id number.

crdant’s picture

Status: Active » Fixed

Primary key has changed to a serial ticket_id, but in order to prevent possible collisions I've left a unique index on password_md5. This makes this optimization still valid, so I've updated the code to include it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.