Page MenuHomePhabricator

Additional error handling needed in OATHAuthHooks::schemaUpdateOldUsers
Closed, ResolvedPublic

Description

In the event that database format upgrade fails because row data cannot be unserialized, the script errors fatally. Additional error handling is needed, or perhaps detection of row format to determine if the row data has already been upgraded.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 23 2016, 5:21 PM
Reedy added a subscriber: Reedy.Sep 16 2016, 10:54 PM
			MediaWiki\suppressWarnings();
			$scratchTokens = unserialize( base64_decode( $row->scratch_tokens ) );
			MediaWiki\restoreWarnings();

would be enough to stop the noise, but isn't really checking for whether things are already migrated

Change 311201 had a related patch set uploaded (by Reedy):
Suppress unserialize errors

https://gerrit.wikimedia.org/r/311201

Change 311201 merged by jenkins-bot:
Suppress unserialize errors

https://gerrit.wikimedia.org/r/311201

Reedy triaged this task as Low priority.Oct 31 2016, 2:45 PM
TheDJ added a subscriber: TheDJ.May 19 2017, 4:33 PM

@Reedy, is more work still required here ?

Reedy renamed this task from Additional error handling needed in maintenance/update_scratch_token_format.php to Additional error handling needed in OATHAuthHooks::schemaUpdateOldUsers.May 19 2017, 4:54 PM

@Reedy, is more work still required here ?

Maybe, but it's probably not worth the time. My previous change stopped it fatal-ing in most cases

Reedy closed this task as Resolved.May 19 2017, 4:56 PM
sbassett moved this task from Backlog to Done on the Security-Team board.Jun 11 2019, 7:07 PM