Skip to content

Conversation

@rullzer
Copy link
Member

@rullzer rullzer commented Jul 22, 2016

Missed case

Basically when a login exception is thrown (bad token/password/disabled user) we should repond with the proper OCS code.

CC: @LukasReschke

@rullzer rullzer added the 3. to review Waiting for reviews label Jul 22, 2016
@rullzer rullzer added this to the Nextcloud 11.0 milestone Jul 22, 2016
@mention-bot
Copy link

@rullzer, thanks for your PR! By analyzing the annotation information on this pull request, we identified @SergioBertolinSG, @DeepDiver1975 and @PVince81 to be potential reviewers

@icewind1991
Copy link
Member

👍

} catch (\OC\OCS\Exception $ex) {
OC_API::respond($ex->getResult(), OC_API::requestedFormat());
} catch (\OC\User\LoginException $e) {
OC_API::respond(new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'Unauthorised'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class OC_OCS_Result has been deprecated with message: Since 9.1.0 use \OC\OCS\Result

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but old obsolete api OC_API.
So I can't pass in \OC\OCS\Result

@rullzer rullzer force-pushed the ocs_correct_login_exception branch from f623e3d to 67ce87d Compare July 22, 2016 11:37
@MorrisJobke
Copy link
Member

👍

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 22, 2016
@rullzer rullzer merged commit 1533780 into master Jul 22, 2016
@rullzer rullzer deleted the ocs_correct_login_exception branch July 22, 2016 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants