[RSS Feed/News] XF\DevelopmentOutput\Permission does not fully validate permission name

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
While the entity validates the permission name, getEntityForImport does not validate the name is in the expected format (ie contains a - character);

PHP:

Code:
protected function getEntityForImport($name, $addOnId, $json, array $options)
{
   list($groupId, $permissionId) = explode('-', $name);

While this would most likely occur when importing potentially hand editor .json files, it would be nice if it gave a nicer error than;
Code:

Notice: Undefined offset: 1 ...
or php 8+...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom