Re: [evolution-patches] calendar patch for 309420



On Tue, 2005-08-23 at 10:56 -0700, Christian Kellner wrote:
> Hi everybody,
> 
> isn't rewriting parts of a url parsing routine not a bit dangerous here?
> Maybe not, I just wanna check:
> 
> +       char *at = strchr (uri, '@');
> +       char *slash;
> 
> This should get the @ between username and host, right? Can it be that a
> user has a @ in the username? I guess it should be url encoded though,
> so that wouldnt be a problem then, but can you relay on that? I know we
> had problems with that in GnomeVFSURI. 
> 
> +       at++; /* Parse over the @ symbol */
> +       slash = strchr (at, '/');
> 
> Then you are grabbing the first path separator and return the portion
> between the @ and the / as the hostname, but what about having port
> specification in the url, like "foo.bar:433/se"? Wouldn't be better to
> use Euri here? Maybe that isnt a problem too because you might wanna
> have that portion in the later concatted new_uri string. 
> 
> +   new_uri = g_strdup_printf ("%s%s;%s %s/", base_uri, user_name,
> auth_type, host_name);
> 
> Concat base_uri, user_name, auth_type and host_name? Is that really what
> you wanna do? So if base_uri is "foo://ckellner bar se" you would get
> "foo://ckellner bar seckellner;plain/password bar se"?

The relative uri is stored in the format username host/ w.r.t 
calendar sources. It would be better to use Euri for parsing.
> 
> Just my $0.02 and I might got that all wrong,
> Christian
> 
> _______________________________________________
> evolution-patches mailing list
> evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]