Skip to content

Commit

Permalink
added qualifyLength function to test against user inputted strings
Browse files Browse the repository at this point in the history
  • Loading branch information
causefx committed May 11, 2022
1 parent 2c46911 commit dbcc0ef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/classes/organizr.class.php
Expand Up @@ -1908,6 +1908,18 @@ public function qualifyRequest($accessLevelNeeded, $api = false)
}
}

public function qualifyLength($string, $length = 100, $api = false)
{
if (strlen($string) <= $length) {
return true;
} else {
if ($api) {
$this->setResponse(409, 'String is over limit of: ' . $length);
}
return false;
}
}

public function getImages()
{
$allIconsPrep = array();
Expand Down

0 comments on commit dbcc0ef

Please sign in to comment.