Closed Bug 1657035 Opened 6 years ago Closed 6 years ago

`Unhandled Exception` error message when BMO 2FA is not enabled

Categories

(Conduit :: Phabricator, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glob, Assigned: dkl)

Details

(Keywords: conduit-triaged)

Attachments

(2 files)

Trying to auth using a BMO account that doesn't have 2FA enabled results in raw PHP exceptions:

PhutilAggregateException
Encountered a processing exception, then another exception when trying to build a
response for the first exception.
- RuntimeException: array_walk_recursive() expects parameter 1 to be array, null given
- Exception: Login using Bugzilla requires multi-factor authentication to be enabled in
Bugzilla. Please enable multi-factor authentication in your Bugzilla Preferences and try
again.

RuntimeException
array_walk_recursive() expects parameter 1 to be array, null given

Exception
Login using Bugzilla requires multi-factor authentication to be enabled in Bugzilla. Please
enable multi-factor authentication in your Bugzilla Preferences and try again.

This looks nasty and hides the useful error message.

The PhutilAggregateException should be caught and just the error message displayed.

Looks like we are throwing a generic exception, which may be partly why this is filtering down to the raw PHP error displayed. There may be a more specific exception that can be thrown to remedy this.

https://github.com/mozilla-services/phabricator-extensions/blob/master/moz-extensions/src/auth/adapter/PhutilBMOAuthAdapter.php#L86

Keywords: conduit-triaged
Priority: -- → P3
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attached file GitHub Pull Request

Merged to master.

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: