public inbox for overseers@sourceware.org
 help / color / mirror / Atom feed
* sourceware.org Bugzilla seems run scripts in HTML
@ 2017-11-12 17:16 Florian Weimer
  2017-11-12 18:10 ` Frédéric Buclin via overseers
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2017-11-12 17:16 UTC (permalink / raw)
  To: Frédéric Buclin, overseers

Hi,

as can be seen with this bug report:

   https://sourceware.org/bugzilla/show_bug.cgi?id=22422

Javascript in HTML attachments appears to be served in such a way that 
is run by browsers.  It is probably best not to visit that attachment 
while being logged in, in case that Javascript code tries to steal 
cookies etc.

Would it be possible to fix this?

Thanks,
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sourceware.org Bugzilla seems run scripts in HTML
  2017-11-12 17:16 sourceware.org Bugzilla seems run scripts in HTML Florian Weimer
@ 2017-11-12 18:10 ` Frédéric Buclin via overseers
  2017-11-12 18:18   ` Frank Ch. Eigler
  2017-11-12 18:18   ` Frank Ch. Eigler
  0 siblings, 2 replies; 6+ messages in thread
From: Frédéric Buclin via overseers @ 2017-11-12 18:10 UTC (permalink / raw)
  To: Florian Weimer, overseers

Le 12. 11. 17 à 18:16, Florian Weimer a écrit :
> Javascript in HTML attachments appears to be served in such a way that
> is run by browsers.  It is probably best not to visit that attachment
> while being logged in, in case that Javascript code tries to steal
> cookies etc.
> 
> Would it be possible to fix this?


Javascript cannot steal login cookies:

    # Prevent JavaScript from accessing login cookies.
    my %cookieargs = ('-httponly' => 1);


Bugzilla can display attachments from an alternate host, but this
feature is not activated for GCC Bugzilla. See the attachment_base
parameter:

http://bugzilla.readthedocs.io/en/5.0/administering/parameters.html#attachments

If overseers is interested in this feature, please provide me an
alternate host name to serve attachments. It can point to the same
physical machine. The point is only to make the browser think it's a
different host so that it activates its cross-site scripting protections.

Meanwhile, I deleted the attachment mentioned by Florian, which looked
like to be an evil script.

Frédéric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sourceware.org Bugzilla seems run scripts in HTML
  2017-11-12 18:10 ` Frédéric Buclin via overseers
@ 2017-11-12 18:18   ` Frank Ch. Eigler
  2017-11-12 18:27     ` Frédéric Buclin via overseers
  2017-11-12 18:18   ` Frank Ch. Eigler
  1 sibling, 1 reply; 6+ messages in thread
From: Frank Ch. Eigler @ 2017-11-12 18:18 UTC (permalink / raw)
  To: LpSolit; +Cc: Florian Weimer, overseers

Hi -

On Sun, Nov 12, 2017 at 07:10:02PM +0100, Frédéric Buclin via overseers wrote:
> [...]
> If overseers is interested in this feature, please provide me an
> alternate host name to serve attachments. [...]

Can it be just another virtualhost - a DNS subdomain - off of the same
server?  I guess we'd need one for gcc.gnu.org too.

- FChE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sourceware.org Bugzilla seems run scripts in HTML
  2017-11-12 18:10 ` Frédéric Buclin via overseers
  2017-11-12 18:18   ` Frank Ch. Eigler
@ 2017-11-12 18:18   ` Frank Ch. Eigler
  2017-11-12 18:33     ` Frédéric Buclin via overseers
  1 sibling, 1 reply; 6+ messages in thread
From: Frank Ch. Eigler @ 2017-11-12 18:18 UTC (permalink / raw)
  To: LpSolit; +Cc: Florian Weimer, overseers

Hi -

> > Javascript in HTML attachments appears to be served in such a way that
> > is run by browsers. [...]

(Could we get bugzilla to serve those with application/octet-stream type?)

- FChE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sourceware.org Bugzilla seems run scripts in HTML
  2017-11-12 18:18   ` Frank Ch. Eigler
@ 2017-11-12 18:27     ` Frédéric Buclin via overseers
  0 siblings, 0 replies; 6+ messages in thread
From: Frédéric Buclin via overseers @ 2017-11-12 18:27 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: Florian Weimer, overseers

Le 12. 11. 17 à 19:17, Frank Ch. Eigler a écrit :
> Can it be just another virtualhost - a DNS subdomain - off of the same
> server?  I guess we'd need one for gcc.gnu.org too.

I don't think a subdomain provides the same level of protection as a
whole separate domain. A browser could be configured to allow subdomains
to interact with each others.

For instance, Mozilla uses bugzilla.mozilla.org as the base domain, and
bug%id%.bmoattachments.org as the alternate domain for attachments,
where %id% is replaced by the bug ID for a higher security level (each
bug has its own subdomain to serve attachments). But I don't think we
need such a high security level, i.e. we don't need one host per bug.

Frédéric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sourceware.org Bugzilla seems run scripts in HTML
  2017-11-12 18:18   ` Frank Ch. Eigler
@ 2017-11-12 18:33     ` Frédéric Buclin via overseers
  0 siblings, 0 replies; 6+ messages in thread
From: Frédéric Buclin via overseers @ 2017-11-12 18:33 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: Florian Weimer, overseers

Le 12. 11. 17 à 19:18, Frank Ch. Eigler a écrit :
> (Could we get bugzilla to serve those with application/octet-stream type?)

I'm not a fan of this solution. You would have to create a blacklist
with potentially evil MIME types. text/html is not the only MIME type
which can execute Javascript code. text/xml could too, and possibly some
other MIME types too.

But if you *really* insist, I could implement such a blacklist. :)


Frédéric

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-12 18:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-12 17:16 sourceware.org Bugzilla seems run scripts in HTML Florian Weimer
2017-11-12 18:10 ` Frédéric Buclin via overseers
2017-11-12 18:18   ` Frank Ch. Eigler
2017-11-12 18:27     ` Frédéric Buclin via overseers
2017-11-12 18:18   ` Frank Ch. Eigler
2017-11-12 18:33     ` Frédéric Buclin via overseers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).