regression since 2.73.2: g_regex_match_simple
Hello,
g_regex_match_simple doesn't work as it used to.
The failures started with version 2.73.2 With 2.73.2 it fails with an error (like mentioned in #2694 (closed))
Since version 2.73.3 there is no error but the regex match does not work. We have identified this issue because we have an issue in gvmd in Kali (https://bugs.kali.org/view.php?id=7926)
It can be easily reproduced with:
#include <stdio.h>
#include <glib.h>
int validate_username (const gchar * name)
{
if (g_regex_match_simple ("^[[:alnum:]-_.]+$", name, 0, 0))
return 0;
else
return 1;
}
int main() {
const gchar * username = "admin";
if (validate_username(username) == 0) {
printf("OK");
} else {
printf("NOT OK");
}
}
The regex should match with "admin" but it doesn't.
FTR: the tests have been done on Debian with the different versions packaged in Debian.