[VOMS-748] VOMS MySQL plugin uses the wrong MySQL type for returning the user id Created: 26/Aug/16 Updated: 27/May/21 Resolved: 09/Sep/16 |
|
Status: | Closed |
Project: | VOMS |
Component/s: | mysql-plugin |
Affects Version/s: | None |
Fix Version/s: | VOMS MySQL plugin v. 3.1.7 |
Security Level: | Public (Visbile by non-authn users.) |
Type: | Bug | Priority: | Major |
Reporter: | Andrea Ceccanti | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
VOMS MySQL plugin uses a signed long int for querying the user id, and return it to VOMS server, but an int should be used instead, as the MYSQL_LONG_TYPE is 4 bytes long. The main consequence of this is that in the VOMS server log UID is logged using the wrong format: LOG_INFO:REQUEST:makeAC (vomsd.cc:935):Userid = "-4294967169"" Probably the mistake in the type selection was caused by the misleading type name, see: https://bugs.mysql.com/bug.php?id=4653 |
Comments |
Comment by Andrea Ceccanti [ 09/Sep/16 ] |
Comment by Andrea Ceccanti [ 26/Aug/16 ] |
Actually the right fix for this is not only to change the C type (long long), but also the MySQL type to MYSQL_LONGLONG, since the id column on the user table is a BIGINT (8 bytes wide). long long is guaranteed to be AT LEAST 8 bytes. |