Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.7.5
-
Novice
Description
When accessing the RequestTokenService of the cxf-rt-rs-security-oauth framework, consumer key and secret will be used to validate the signature of the sent message. When signature fails (ie. wrong clientsecret), an exception is thrown and catched, but since the actual requesttoken is null at that time, the exception is not thrown any further and the requesttoken will be generated afterwards and passed to the connected client even when the signature verification failed. See snippet of the OAuthUtils class.
[2.7.5 - lines 107-114]
try
{ validator.validateMessage(oAuthMessage, accessor); } catch (Exception ex) {
if (token != null)
}
If I'm correct, a possible solution will be to move the throw exception statement out of the if statement so that in case of catched exception it's always thrown further.
This is a minor bug, since in the next oauth step the signature verification will fail and since the token will not be null in this case, the exception is thrown the oauth flow will end unsuccesful.