Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 61... Línea 61...
61
        // A regular domain name.
61
        // A regular domain name.
Línea 62... Línea 62...
62
 
62
 
63
        // This doesn't match I18N domain names, but we don't have proper IRI support,
63
        // This doesn't match I18N domain names, but we don't have proper IRI support,
Línea 64... Línea 64...
64
        // so force users to insert Punycode.
64
        // so force users to insert Punycode.
65
 
65
 
66
        // There is not a good sense in which underscores should be
66
        // Underscores defined as Unreserved Characters in RFC 3986 are
67
        // allowed, since it's technically not! (And if you go as
-
 
68
        // far to allow everything as specified by the DNS spec...
-
 
69
        // well, that's literally everything, modulo some space limits
-
 
70
        // for the components and the overall name (which, by the way,
-
 
71
        // we are NOT checking!).  So we (arbitrarily) decide this:
67
        // allowed in a URI. There are cases where we want to consider a
72
        // let's allow underscores wherever we would have allowed
68
        // URI containing "_" such as "_dmarc.example.com".
73
        // hyphens, if they are enabled.  This is a pretty good match
-
 
74
        // for browser behavior, for example, a large number of browsers
-
 
75
        // cannot handle foo_.example.com, but foo_bar.example.com is
69
        // Underscores are not allowed in the default. If you want to
Línea 76... Línea 70...
76
        // fairly well supported.
70
        // allow it, set Core.AllowHostnameUnderscore to true.
77
        $underscore = $config->get('Core.AllowHostnameUnderscore') ? '_' : '';
71
        $underscore = $config->get('Core.AllowHostnameUnderscore') ? '_' : '';
78
 
72
 
79
        // Based off of RFC 1738, but amended so that
73
        // Based off of RFC 1738, but amended so that
80
        // as per RFC 3696, the top label need only not be all numeric.
74
        // as per RFC 3696, the top label need only not be all numeric.
81
        // The productions describing this are:
75
        // The productions describing this are:
82
        $a   = '[a-z]';     // alpha
76
        $a   = '[a-z]';     // alpha
83
        $an  = '[a-z0-9]';  // alphanum
77
        $an  = "[a-z0-9$underscore]";  // alphanum
84
        $and = "[a-z0-9-$underscore]"; // alphanum | "-"
78
        $and = "[a-z0-9-$underscore]"; // alphanum | "-"
85
        // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum
79
        // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum