Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 905264 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/manage.c (-1 / +1 lines)
Lines 6178-6184 Link Here
6178
int
6178
int
6179
validate_username (const gchar * name)
6179
validate_username (const gchar * name)
6180
{
6180
{
6181
  if (g_regex_match_simple ("^[[:alnum:]-_.]+$", name, 0, 0))
6181
  if (g_regex_match_simple ("^[[:alnum:]_.-]+$", name, 0, 0))
6182
    return 0;
6182
    return 0;
6183
  else
6183
  else
6184
    return 1;
6184
    return 1;
(-)a/src/manage_configs.c (-1 / +1 lines)
Lines 318-324 Link Here
318
318
319
  split = g_regex_split_simple
319
  split = g_regex_split_simple
320
           (/* Full-and-Fast--daba56c8-73ec-11df-a475-002264764cea.xml */
320
           (/* Full-and-Fast--daba56c8-73ec-11df-a475-002264764cea.xml */
321
            "^.*([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12}).xml$",
321
            "^.*([0-9a-f]{8})\\-([0-9a-f]{4})\\-([0-9a-f]{4})\\-([0-9a-f]{4})\\-([0-9a-f]{12}).xml$",
322
            path, 0, 0);
322
            path, 0, 0);
323
323
324
  if (split == NULL || g_strv_length (split) != 7)
324
  if (split == NULL || g_strv_length (split) != 7)
(-)a/src/manage_port_lists.c (-1 / +1 lines)
Lines 253-259 Link Here
253
253
254
  split = g_regex_split_simple
254
  split = g_regex_split_simple
255
           (/* Full-and-Fast--daba56c8-73ec-11df-a475-002264764cea.xml */
255
           (/* Full-and-Fast--daba56c8-73ec-11df-a475-002264764cea.xml */
256
            "^.*([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12}).xml$",
256
            "^.*([0-9a-f]{8})\\-([0-9a-f]{4})\\-([0-9a-f]{4})\\-([0-9a-f]{4})\\-([0-9a-f]{12}).xml$",
257
            path, 0, 0);
257
            path, 0, 0);
258
258
259
  if (split == NULL || g_strv_length (split) != 7)
259
  if (split == NULL || g_strv_length (split) != 7)
(-)a/src/manage_report_formats.c (-2 / +3 lines)
Lines 613-619 Link Here
613
613
614
  split = g_regex_split_simple
614
  split = g_regex_split_simple
615
           (/* Full-and-Fast--daba56c8-73ec-11df-a475-002264764cea.xml */
615
           (/* Full-and-Fast--daba56c8-73ec-11df-a475-002264764cea.xml */
616
            "^.*([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12}).xml$",
616
            "^.*([0-9a-f]{8})\\-([0-9a-f]{4})\\-([0-9a-f]{4})\\-([0-9a-f]{4})\\-([0-9a-f]{12}).xml$",
617
            path, 0, 0);
617
            path, 0, 0);
618
618
619
  if (split == NULL || g_strv_length (split) != 7)
619
  if (split == NULL || g_strv_length (split) != 7)
Lines 867-870 Link Here
867
      return TRUE;
867
      return TRUE;
868
868
869
  return FALSE;
869
  return FALSE;
870
}
870
}
871
(-)a/src/manage_sql.c (-4 / +4 lines)
Lines 7001-7007 Link Here
7001
7001
7002
      if (strcmp (name, "tp_sms_hostname") == 0)
7002
      if (strcmp (name, "tp_sms_hostname") == 0)
7003
        {
7003
        {
7004
          if (g_regex_match_simple ("^[0-9A-Za-z][0-9A-Za-z.-]*$",
7004
          if (g_regex_match_simple ("^[0-9A-Za-z][0-9A-Za-z.\\-]*$",
7005
                                    *data, 0, 0)
7005
                                    *data, 0, 0)
7006
              == FALSE)
7006
              == FALSE)
7007
            {
7007
            {
Lines 49987-49994 Link Here
49987
           */
49987
           */
49988
          languages_regex
49988
          languages_regex
49989
            = g_regex_new ("^(Browser Language|"
49989
            = g_regex_new ("^(Browser Language|"
49990
                           "([a-z]{2,3})(_[A-Z]{2})?(@[[:alnum:]_-]+)?"
49990
                           "([a-z]{2,3})(_[A-Z]{2})?(@[[:alnum:]_\\-]+)?"
49991
                           "(:([a-z]{2,3})(_[A-Z]{2})?(@[[:alnum:]_-]+)?)*)$",
49991
                           "(:([a-z]{2,3})(_[A-Z]{2})?(@[[:alnum:]_\\-]+)?)*)$",
49992
                           0, 0, NULL);
49992
                           0, 0, NULL);
49993
          match = g_regex_match (languages_regex, value, 0, NULL);
49993
          match = g_regex_match (languages_regex, value, 0, NULL);
49994
          g_regex_unref (languages_regex);
49994
          g_regex_unref (languages_regex);
Lines 50572-50578 Link Here
50572
  if (strcmp (uuid, SETTING_UUID_LSC_DEB_MAINTAINER) == 0)
50572
  if (strcmp (uuid, SETTING_UUID_LSC_DEB_MAINTAINER) == 0)
50573
    {
50573
    {
50574
      if (g_regex_match_simple
50574
      if (g_regex_match_simple
50575
            ("^([[:alnum:]-_]*@[[:alnum:]-_][[:alnum:]-_.]*)?$",
50575
            ("^([[:alnum:]\\-_]*@[[:alnum:]\\-_][[:alnum:]\\-_.]*)?$",
50576
            value, 0, 0) == FALSE)
50576
            value, 0, 0) == FALSE)
50577
        return 1;
50577
        return 1;
50578
    }
50578
    }
(-)a/src/manage_sql_report_formats.c (-1 / +1 lines)
Lines 2470-2476 Link Here
2470
      case REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST:
2470
      case REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST:
2471
        {
2471
        {
2472
          if (g_regex_match_simple
2472
          if (g_regex_match_simple
2473
                ("^(?:[[:alnum:]-_]+)?(?:,(?:[[:alnum:]-_])+)*$", value, 0, 0)
2473
                ("^(?:[[:alnum:]\\-_]+)?(?:,(?:[[:alnum:]\\-_])+)*$", value, 0, 0)
2474
              == FALSE)
2474
              == FALSE)
2475
            return 1;
2475
            return 1;
2476
          else
2476
          else
(-)a/src/utils.c (-1 / +1 lines)
Lines 337-343 Link Here
337
  epoch_time = 0;
337
  epoch_time = 0;
338
338
339
  if (regex == NULL)
339
  if (regex == NULL)
340
    regex = g_regex_new ("^([0-9]{4}-[0-9]{2}-[0-9]{2})"
340
    regex = g_regex_new ("^([0-9]{4}\\-[0-9]{2}\\-[0-9]{2})"
341
                         "[T ]([0-9]{2}:[0-9]{2})"
341
                         "[T ]([0-9]{2}:[0-9]{2})"
342
                         "(:[0-9]{2})?(?:\\.[0-9]+)?"
342
                         "(:[0-9]{2})?(?:\\.[0-9]+)?"
343
                         "(Z|[+-][0-9]{2}:?[0-9]{2})?$",
343
                         "(Z|[+-][0-9]{2}:?[0-9]{2})?$",

Return to bug 905264