|
|
@@ -575,6 +575,9 @@ class Bookmark extends Organizr
|
|
|
$this->setAPIResponse('error', 'Tab name: ' . $array['name'] . ' is already taken', 409);
|
|
|
return false;
|
|
|
}
|
|
|
+ if (!$this->qualifyLength($array['name'], 50, true)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
} else {
|
|
|
$this->setAPIResponse('error', 'Tab name was not supplied', 422);
|
|
|
return false;
|
|
|
@@ -646,6 +649,9 @@ class Bookmark extends Organizr
|
|
|
$this->setAPIResponse('error', 'Tab name: ' . $array['name'] . ' is already taken', 409);
|
|
|
return false;
|
|
|
}
|
|
|
+ if (!$this->qualifyLength($array['name'], 50, true)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
if (array_key_exists('background_color', $array)) {
|
|
|
$array['background_color'] = $this->sanitizeUserString($array['background_color']);
|
|
|
@@ -887,6 +893,9 @@ class Bookmark extends Organizr
|
|
|
$this->setAPIResponse('error', 'Category name: ' . $array['category'] . ' is already taken', 409);
|
|
|
return false;
|
|
|
}
|
|
|
+ if (!$this->qualifyLength($array['category'], 50, true)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
} else {
|
|
|
$this->setAPIResponse('error', 'Category name was not supplied', 422);
|
|
|
return false;
|
|
|
@@ -930,6 +939,9 @@ class Bookmark extends Organizr
|
|
|
$this->setAPIResponse('error', 'Category name: ' . $array['category'] . ' is already taken', 409);
|
|
|
return false;
|
|
|
}
|
|
|
+ if (!$this->qualifyLength($array['category'], 50, true)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
if (array_key_exists('default', $array)) {
|
|
|
if ($array['default']) {
|