Fixed Approval Queue does not use same action => method standardization as rest of the codebase

Xon

Well-known member
Affected version
2.0.10
Most callback locations standardize the method name via $method = 'get' . \XF\Util\Php::camelCase($offset); (ie entities or controllers), but approval queue does not, it uses $method = 'action' . ucfirst($action); which is unexpectedly different.

Worse, LogicException: invalid_method is thrown if the submitted HTML value for the action does not match as expected, resulting in an 500 error for user submitted data.
 
We actually spotted this when making the approval queue improvements in XF 2.1 and it has been changed now in 2.1.

Given that this could be a breaking change for existing add-ons, I don’t think we’ll be changing it in 2.0.

We’ll add some better method validation though.
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.11).

Change log:
Return an error phrase upon invalid callback validation when performing approval queue actions. Note that the method name switches to ucfirst(\XF\Util\Php::camelCase($action)) in XF 2.1 but remains as ucfirst($action) in XF 2.0.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom