Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

New rule: prevent mixed content #20

Closed
Elchi3 opened this issue Jul 13, 2017 · 6 comments
Closed

New rule: prevent mixed content #20

Elchi3 opened this issue Jul 13, 2017 · 6 comments

Comments

@Elchi3
Copy link
Member

Elchi3 commented Jul 13, 2017

Original issue Elchi3/mdn-doc-tests#143.
Test if sources are HTTPS (e.g. images) to prevent mixed content.

I believe images and things we embed are already https pretty much everywhere, but it looks like we are not actually testing it.

https://twitter.com/DevDocs/status/718123621491847168

@MatonAnthony
Copy link
Collaborator

Do we know the list of allowed filetypes on MDN ?

Subsidiary question: Shouldn't we only use ressources inside of MDN to avoid 404 when the ressource provider doesn't provide the ressources anymore ?

@SebastianZ
Copy link

SebastianZ commented Jul 14, 2017

I think basically you need to check whether the URLs of resources use HTTPS and not HTTP. This isn't about file types or internal vs. external resources.

I.e. you just need to check the URL string, not do the request yourself (which would slow down the test suite, anyway).

Sebastian

@MatonAnthony
Copy link
Collaborator

MatonAnthony commented Jul 14, 2017

Do we know the list of allowed filetypes on MDN ?

After a night on it, it is unecessary, I agree.

Subsidiary question: Shouldn't we only use ressources inside of MDN to avoid 404 when the ressource provider doesn't provide the ressources anymore ?

Still stands, if we should be using internal ressources, I won't implement it the same way.

@MatonAnthony
Copy link
Collaborator

And should this return an ERROR, a WARNING or an INFO ?

@SebastianZ
Copy link

I'm not sure whether there are cases where mixed content should be allowed. If so, it should be WARNING, but I rather tend to ERROR.

Sebastian

@MatonAnthony
Copy link
Collaborator

I did a first attempt at a rule, it only checks images, I don't know if they are other sources of mixed content ?.

It triggers an ERROR but this can be changed easily if needed.

MatonAnthony added a commit that referenced this issue Jul 17, 2017
* Mixed Content linting rule
* Replace href by src as per HTML Standard
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants