projects
/
platform
/
upstream
/
gumd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
744241c
)
Allow to use ':' character in user password
09/221409/3
accepted/tizen/unified/20200107.043336
submit/tizen/20200106.024200
author
Yunmi Ha
<yunmi.ha@samsung.com>
Thu, 2 Jan 2020 06:34:34 +0000
(15:34 +0900)
committer
Yunmi Ha
<yunmi.ha@samsung.com>
Mon, 6 Jan 2020 02:29:14 +0000
(11:29 +0900)
Change-Id: I3cbc9905d4834570c1635db62826696770419bb4
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
src/common/gum-validate.c
patch
|
blob
|
history
diff --git
a/src/common/gum-validate.c
b/src/common/gum-validate.c
index
acb4600
..
5e8e4e2
100644
(file)
--- a/
src/common/gum-validate.c
+++ b/
src/common/gum-validate.c
@@
-220,7
+220,7
@@
gum_validate_db_string_entry (
* @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.
* @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.
*/
*
* Returns: TRUE if validation succeeds, FALSE otherwise.
*/
@@
-229,13
+229,13
@@
gum_validate_db_secret_entry (
const gchar *str,
GError **error)
{
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,
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, 0x
3a, 0x
00
+ 0x7f, 0x00
};
if (!str) {
};
if (!str) {
@@
-245,7
+245,7
@@
gum_validate_db_secret_entry (
if (strpbrk (str, invalid) != NULL) {
GUM_RETURN_WITH_ERROR (GUM_ERROR_INVALID_SECRET,
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;
}
}
return TRUE;
}