* @error: (transfer none): the #GError to be set in case of error
*
* Validates the string @str to be used as secret in the user/group database.
- * No control chars (0x00-0x1F,0x7F) or colon (':' 0x3A) is allowed.
+ * No control chars (0x00-0x1F,0x7F) are allowed.
*
* Returns: TRUE if validation succeeds, FALSE otherwise.
*/
const gchar *str,
GError **error)
{
- /* list of control chars (0x00-0x1F,0x7F) and colon (':' 0x3A) */
+ /* list of control chars (0x00-0x1F,0x7F) */
static const char invalid[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x7f, 0x3a, 0x00
+ 0x7f, 0x00
};
if (!str) {
if (strpbrk (str, invalid) != NULL) {
GUM_RETURN_WITH_ERROR (GUM_ERROR_INVALID_SECRET,
- "No control characters or ':' is allowed", error, FALSE);
+ "No control characters are allowed", error, FALSE);
}
return TRUE;
}