Skip Menu |

This queue is for tickets about the CatalystX-OAuth2 CPAN distribution.

Report information
The Basics
Id: 106576
Status: new
Priority: 0/
Queue: CatalystX-OAuth2

People
Owner: Nobody in particular
Requestors: mark.stringer [...] adestra.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Clients can steal authorization codes - CatalystX::OAuth2::Store::DBIC
Date: Fri, 21 Aug 2015 12:07:40 +0100
To: <bug-CatalystX-OAuth2 [...] rt.cpan.org>
From: Mark Stringer <mark.stringer [...] adestra.com>
Hi, I discovered that it's possible for a client to convert an authorization code from another client into an access token for themselves. I believe I've tracked it down to a bug in CatalystX::OAuth2::Store::DBIC. The ternary operator's conditions appear to be the wrong way around in sub find_client_code: |||return| |$id| |||? ||$self||->_code_rs->find(||$code||)| |||: ||$self||->_code_rs(||$id||)->find(||$code||);| Changing them around does seem to fix my issue, but causes 3 tests to fail in the distribution. Thanks Mark

Message body is not shown because it is too large.