Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Mixed check - #8960

Closed
galeksandrp wants to merge 2 commits into
EFForg:masterfrom
galeksandrp:mixed-check
Closed

galeksandrp wants to merge 2 commits into
EFForg:masterfrom
galeksandrp:mixed-check

Conversation

@galeksandrp

Copy link
Copy Markdown
Contributor

If you are not impressed by franciskim/check-mixed-content@master

check-mixed-content --depth=1 --url {}

can be replaced by bramus/mixed-content-scan@master

~/.composer/vendor/bin/mixed-content-scan https://{} --no-crawl --format=json | jq -e 'select(.level==400)'

@galeksandrp galeksandrp mentioned this pull request Mar 7, 2017
14 of 18 tasks
@J0WI

J0WI commented Mar 29, 2017

Copy link
Copy Markdown
Contributor

This cannot replace manual review, but it could be a help.
ping @Hainish

@Hainish Hainish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if a PR does introduce active mixed content, we don't want the tests to fail for it. It might be nice to know (perhaps with a github label?) but lots of sites have some active mixed content blocked and this does not at all impede site functionality.

Comment thread .travis.yml
- TEST=chromium
- TEST=rules
- TEST=fetch
- TEST=preloaded

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

www.freerunet.ru self signed
-->
<ruleset name="freerunet.ru" platform="mixedcontent">
<ruleset name="freerunet.ru">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep changes granular. this belongs in another PR

Comment thread test/travis.sh

if [ "$TEST" == "mixed" ]; then
echo >&2 "Ensuring rulesets do not introduce targets containing active mixed content."
docker run --rm -ti -v $(pwd):/opt -e RULESETS_CHANGED="$RULESETS_CHANGED" node bash -c "cd /opt && apt-get update && apt-get install -y libxml2-utils && npm install -g galeksandrp/check-mixed-content#245e56ad5fd5412bdad986276911e5460d9e48c6 && xmllint --xpath '//ruleset[not(@platform)]/target' $RULESETS_CHANGED | grep -q -v '^$' || exit 0 && xmllint --xpath '//ruleset[not(@platform)]/target' $RULESETS_CHANGED | sed 's/<target host=\"//g' | sed 's&\"/>&\n&g' | grep -v '*' | xargs -n1 -i bash -c 'check-mixed-content --depth=1 --url {}' | grep ' has active mixed content!' && exit 1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This belongs in a utils/ subpath, as we've done before for other tests.

@Hainish Hainish closed this Mar 29, 2017
@J0WI

J0WI commented Apr 3, 2017

Copy link
Copy Markdown
Contributor

If it's possible to add labels depending on Travis results there would be a lot of use cases for it.
E.g. redirects that are not the same on http/https as in the rule, or when there is a big difference in the content.

@J0WI

J0WI commented May 4, 2017

Copy link
Copy Markdown
Contributor

Maybe we can use this tool to fix #529?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants