WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#17945 closed defect (bug) (invalid)

user IDs > 2147483647 in table "users" get mapped to user IDs <= 2147483647 in table "usermeta"

Reported by: bugreporter Owned by:
Milestone: Priority: normal
Severity: blocker Version: 3.1.4
Component: Users Keywords: close reporter-feedback
Focuses: Cc:

Description

e.g. user ID 2147483648 gets mapped to 2147483647, user ID 4294967295 gets mapped to 1 (killed my admin!), etc.

Change History (4)

comment:1 @scribu4 years ago

  • Keywords close reporter-feedback added

Both wp_users.ID and wp_usermeta.user_id columns have the same definition: bigint(20) unsigned therefore, this is unlikely to be caused by SQL.

My bet is incorrect plugin/theme code. Please disable all plugins and switch to default theme and then try to create a new user with some other capability other than admin.

Version 1, edited 4 years ago by scribu (previous) (next) (diff)

comment:2 @dd324 years ago

2147483647 is the largest number a 32bit installation of PHP can store in it's INT datatype.

a 32bit system may be able to store a larger integer in a float data type however.

Ultimately, I'd suggest upgrading to 64bit, to give an MAX_INT of 9223372036854775807

comment:3 @azaozz4 years ago

Do you really have more than 2,147,483,647 users? :-)

Seriously, if randomizing user_id perhaps limit them to 2,000,000,000.

comment:4 @SergeyBiryukov3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.