--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.
1. If you remove the Content-Security-Policy header altogether, does it work?
2. You could add an external JavaScript to the page that goes over all of the links and converts the inline event handler to addEventListener. Ugly, but probably works.
--
1. Inline scripts/event listeners are allowed in pages that have not declared a content security policy, so your Chromium based product might be adding some content security policy enforcement that Chrome does not, in which case, there is not much this group can do to help you.
Do you happen to be using a Chrome application/extension (an installed CRX/unpacked) to host those pages (they have an implicit content security policy)?
2. 40 - 50 listeners should not be a problem (inline event listeners and addEventListener have similar costs anyway).
Chromium *does* allow inline onclicks by default. Content-Security-Policy is an opt-in feature: if you don't ask to have a more restrictive policy, then you shouldn't get one.
If you do, then either Comodo have changed something in their version, or there's a bug in the code that needs to be fixed,
or you're not doing what you think you're doing.
This is not "Chromium not respecting the standards"
and being rude to people who are trying to help isn't constructive.
Le jeudi 20 juillet 2017 20:54:23 UTC+2, Torne (Richard Coles) a écrit :Chromium *does* allow inline onclicks by default. Content-Security-Policy is an opt-in feature: if you don't ask to have a more restrictive policy, then you shouldn't get one.
Chromium? - I did try it, had problems, and then decided that Dragon was potentially less invasive.
Until then I wasn't even aware that it was necessary to change Content Security Policy - I had nothing at all concerning that.
My pages just stopped working - without any error messages.
If you do, then either Comodo have changed something in their version, or there's a bug in the code that needs to be fixed,
Maybe. I haven't had an answer from them.
or you're not doing what you think you're doing.
Well - that's exactly the question I asked!
This is not "Chromium not respecting the standards"
Google Chrome has its own ideas and won't listen to people who don't agree. I got rid of it quickly and replace it on my clients' machines if I can.
But I seem to have the same problems with Chomium and Dragonand being rude to people who are trying to help isn't constructive.
I thanked PhistucK who tried to help for his suggestions - and criticised Google developers who refuse to listen to users' opinions or conform to normal practices.
It's just like Microsoft - Internet Explorer has never respected WWW standards and causes immense headaches for those who want to program sites accessible to everybody.
It was a bit calmer for a while: IE (depending on the version however) or all the rest...
Now Chrome(ium) has suddenly introduced new complications - and according to what you say it appears also that we are going to have to take into account whether it's Google Chrome, Chromium, or Dragon..
--
It's not necessary to change content security policy. The default policy if you don't set one (per the standards, and in all major browsers including Chromium/Chrome) is "everything is allowed".
So, if inline script is being blocked, then either you actually *are* specifying a content security policy that says inline script should be blocked without realising it,
or you're using a browser that's changed this for some reason which would break huge numbers of websites, or there's a bug in the code that affects the particular situation you're in.
When we say "Chromium" here we're often referring to the entire family of chromium-based browsers, since they inherit all the chromium code and so behave exactly the same as Chromium unless that particular browser has chosen to change a particular thing.
The quickest way to check if it's an issue with Comodo or not is to compare it to the behaviour in Chromium or Google Chrome, which definitely have the right behaviour in normal cases - it's not clear from your messages whether you've tried this already or not.
If it fails the same way in Chrome/Chromium then the most likely explanation is that something is actually setting a content security policy in your configuration somehow without you realising it
This doesn't seem to have anything to do with what I was saying. It sounded like you were assuming that this was some deliberate decision by Chromium to change behaviour in a way that breaks existing pages and doesn't match the standards
Thanks PhistucK
Le jeudi 20 juillet 2017 17:39:48 UTC+2, PhistucK a écrit :1. Inline scripts/event listeners are allowed in pages that have not declared a content security policy, so your Chromium based product might be adding some content security policy enforcement that Chrome does not, in which case, there is not much this group can do to help you.
My "product" is Comodo Dragon.
I posted the same problem in their own support forum but nobody has answered.
Do you happen to be using a Chrome application/extension (an installed CRX/unpacked) to host those pages (they have an implicit content security policy)?
No, it's just plain HTML pages on an ordinary Apache server (nothing to do with Chromium).
2. 40 - 50 listeners should not be a problem (inline event listeners and addEventListener have similar costs anyway).OK - but that would still make me a lot of work.I can use a grep to change the "OnClick" in all my HTML files but have to figure out a way to create and insert unique ID's at the same time (I could do it easily in JavaScript on each page but it wouldn't be allowed).
The eventListeners have got to be attached to a documentGetElementById and they need an argument to know what to to (which photo to display) - that could be an array ['ID' <-> URL de la photo].
Wouldn't need the anchors - the event listener could just watch the thumbnail.
It would be so much simpler to simply allow the inline onClicks - I will never have the time to do the rest and will just finish par diplaying an alert to Chrome users that it imposes limits that prevent using the site: so use a different browser - 'any'...).
As a programmer of the "old school" I always worked on the principle that "all sites should work correctly wirh all the navigators in current use".
But nowadays no-on sticks to that; if anything doesn't work they just tell you to try another one. So if Chromium doesn't respect the standards I'm going to do the same.
BTW - I tried and quickly abandoned Chrome(ium) for development because of their ridiculous refusal to fix the fille:// cookies BUG.
I develop all my sites on my hard disk before ever uploading them to Internet. Can't waste time with their other personal idiosynchrosies as well.
(The command line option "--enable-file-cookies" does NOT work).
Le jeudi 20 juillet 2017 21:52:15 UTC+2, Torne (Richard Coles) a écrit :It's not necessary to change content security policy. The default policy if you don't set one (per the standards, and in all major browsers including Chromium/Chrome) is "everything is allowed".
I _did not have ANY_ Content Secutiy Policy defined anywhere.
I was not even aware that inline JavaSvript was a new issue (since the same code had worked perfectly for 16 years).
(For the sites I work on security is not a concern.)
So, if inline script is being blocked, then either you actually *are* specifying a content security policy that says inline script should be blocked without realising it,
How, where?
or you're using a browser that's changed this for some reason which would break huge numbers of websites, or there's a bug in the code that affects the particular situation you're in.
I have four browsers:
- Seamonkey (for my personal use)
- FireFox (same engine, but without all the volontary protection/limitaions of the above)
- Internet Explorer
- Dragon
The last three are for testing my own HTML pages with differrent engines (I used to use Opera, but got disappointed)
ALL my own pages work fine in all of them except for those I have mentionned which suddenly stopped working in Chrom* browsers (I am almost sure that they worked in Google Chrome before).
When we say "Chromium" here we're often referring to the entire family of chromium-based browsers, since they inherit all the chromium code and so behave exactly the same as Chromium unless that particular browser has chosen to change a particular thing.
That is what I assumed...The quickest way to check if it's an issue with Comodo or not is to compare it to the behaviour in Chromium or Google Chrome, which definitely have the right behaviour in normal cases - it's not clear from your messages whether you've tried this already or not.
See above.
I will try Chromium again.
If it fails the same way in Chrome/Chromium then the most likely explanation is that something is actually setting a content security policy in your configuration somehow without you realising it
How, where?
This doesn't seem to have anything to do with what I was saying. It sounded like you were assuming that this was some deliberate decision by Chromium to change behaviour in a way that breaks existing pages and doesn't match the standards
Foe example - Google Chrome deliberately decided and has always refused despite many developers' complaints to ban cookies with the file:// protocol (the same restiction applied with Chromium when I tried it). Alll other browsers accept them.
Now most of us develop sites on our hard disks before uploading them to Internet (we haven't all got ultra-high speed connexions - I just came back from a client who has a satellite connexion at 512kBit/s, mine is a bit better - 2Mbit/s).
That means that - even if it has some useful developer tools (but no better than Firefox) - it is unuseable for site development, therefore not particularly interesting for programmers - we just use it to see how others view our sites on line. And that is how I discovered this bug.
--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
Can you share the URL so people could debug it?
Alternatively, can you try it with Google Chrome (or Chromium)?
Or even with other browsers, like Firefox?
If the issue reproduces in Firefox as well, it would be more likely that something has changed in your setup
Actually, with my suggestions, you will not have to grep anything. Just include a simple single JavaScript file in all of the HTML files that goes over any element with an onclick attribute and adds an event listener using addEventListener and the content of the attribute. It is fully automated and should only take a few minutes.
Hi PhistucK
Le jeudi 20 juillet 2017 22:35:41 UTC+2, PhistucK a écrit :Can you share the URL so people could debug it?
Yes, but I'll simplfy it and just publish one page that demonstrates the problem.
Alternatively, can you try it with Google Chrome (or Chromium)?
I think it was OK wirh Chrome a while ago (but I didn't keep it for long because of Google's spying policy).
I will try it again with Chromium.
Or even with other browsers, like Firefox?
It all still works fine with Firefox, SeaMonkey (same engine) and Internet Explorer.
It never stopped working: I just hadn't tested with Chromium/Dragon for a while (because it had always worked) and was surpised that it no longer did.If the issue reproduces in Firefox as well, it would be more likely that something has changed in your setup
Nope - no other browsers (I have asked others to test as well).
Actually, with my suggestions, you will not have to grep anything. Just include a simple single JavaScript file in all of the HTML files that goes over any element with an onclick attribute and adds an event listener using addEventListener and the content of the attribute. It is fully automated and should only take a few minutes.
Sorry, I don't understand how can I do this?
None of the elements have any ID to pass to addEventListener
For example (one complete element):
<td>
<a onClick="newwind('photo.jpg',langue);"><img src="../thumb/photo.jpg" alt="" width="128" height="96" border="2" style="border-color:#006600;"></a>
</td>
I agree that it should work, but you either want a quick solution (applying a fix to your pages) or a full solution (fix a bug in Chromium, assuming it is a bug in Chromium). The former was suggested to you above and the latter needs a URL that reproduces the issue so it could be debugged.I would apply a simple fix, but I would like the solution proposed ("unsafe-inline") to work!
I would not go that far - browsers have been converging more and more in favor of compatibility with the web and interoperability with each other. Sometimes browsers have bugs and in order to resolve the issue (temporarily or not) quickly, another browser will be suggested.
It happens to me more and more often! - and especially from big Internet-involved companies who have the resources to program and test their sites but just don' t care!
You insistence on using file:// URLs instead of a small standalone run-without-any-installation static server does not make a lot of sense to me, frankly, but you are entitled to your own opinion, obviously. :) file:// URL cookies were used for malicious purposes (as far as I understand) and so were dropped.
How? - the explanations that I have read don't make much sense.
There are just two people who have access to my internal (Ethernet) network. Nobody else can read any cookies stored with file://
All cookies except certain authorised permanent are deleted on exiting the navigator.
I really don't see any possible threat - why can't I use the option to allow file cookies?