PATCH: Better cross-domain cookie detection [BR 66090]

Dawit A. adawit at kde.org
Mon Dec 1 00:53:02 GMT 2003


On Sunday 30 November 2003 15:11, Waldo Bastian wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sun November 30 2003 17:51, Dawit A. wrote:
> > Okay, patch is attached. It seems to work fine now.
>
> Starts to look good. There are two changes in there that might be
> problematic though:
>
> - -            KURL r = req->m_docLoader->doc()->URL();
> - -            job->addMetaData("referrer", r.url());
> has effectively become:
>              KHTMLPart *part = req->m_docLoader->part();
> +            job->addMetaData( "referrer", part->url().url() );
> +            job->addMetaData( "cross-domain", part->sourceURL().url() );
>
> This replaces  req->m_docLoader->doc()->URL() with
> req->m_docLoader->part()->url(), I'm not sure if that is a good idea.

I have reverted it back with the exception that we no longer need to assign it 
to a KURL object first.

> And more general, it fails to check if req->m_docLoader->part() is null.

Added the check for a NULL part. I assumed it could never happen, but it never 
hurts to check anyways. 

-- 
Regards,
Dawit A.
"Preach what you practice, practice what you preach"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross-domain-2.diff
Type: text/x-diff
Size: 7146 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031130/45c6b6f1/attachment.diff>


More information about the kde-core-devel mailing list