Changeset 5890 for branches/1.2x


Ignore:
Timestamp:
May 21, 2008, 8:56:10 PM (14 years ago)
Author:
charles
Message:

(1.2x) #934: remove invalid tracker addresses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2x/libtransmission/utils.c

    r5759 r5890  
    937937tr_httpIsValidURL( const char * url )
    938938{
     939    const char * c;
     940    static const char * rfc2396_valid_chars =
     941        "abcdefghijklmnopqrstuvwxyz" /* lowalpha */
     942        "ABCDEFGHIJKLMNOPQRSTUVWXYZ" /* upalpha */
     943        "0123456789"                 /* digit */
     944        "-_.!~*'()"                  /* mark */
     945        ";/?:@&=+$,"                 /* reserved */
     946        "<>#%<\""                    /* delims */
     947        "{}|\\^[]`";                 /* unwise */
     948
     949    for( c=url; c && *c; ++c )
     950        if( !strchr( rfc2396_valid_chars, *c ) )
     951            return FALSE;
     952
    939953    return !tr_httpParseURL( url, -1, NULL, NULL, NULL );
    940954}
Note: See TracChangeset for help on using the changeset viewer.