Skip to content

Commit

Permalink
Badge: Fix WAC checking instance
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay committed Dec 18, 2023
1 parent b74576b commit f3eb210
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Services/Badge/classes/class.ilBadgeWAC.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ class ilBadgeWAC implements ilWACCheckingClass
{
public function canBeDelivered(ilWACPath $ilWACPath)
{
return true;
if (strpos($ilWACPath->getPath(), '..') !== false) {
return false;
}

if (preg_match('@ilBadge\/badge(.*?)\/@ui', $ilWACPath->getPath())) {
return true;
}

return false;
}
}

0 comments on commit f3eb210

Please sign in to comment.