-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Change links to use HTTPs #415
Conversation
zschallz
commented
Oct 19, 2019
- Changed template links to use HTTPS
- Added a test to ensure http:// isn't referenced anywhere in the templates unless it's whitelisted.
…s unless they're whitelisted
@@ -182,7 +182,6 @@ <h3>Discord</h3> | |||
<p> | |||
<a class="button-small" href="https://github.com/jmhobbs/terminal-parrot">Terminal</a> | |||
<a class="button-small" href="https://github.com/Shrugs/partyparrot">Text-To-Parrots</a> | |||
<a class="button-small" href="http://countryparrots.com/">Country Parrots</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a dead link, so I removed it.
@@ -211,15 +210,15 @@ <h3>Discord</h3> | |||
</p> | |||
|
|||
<p> | |||
<a class="button-small" href="http://kakaporecovery.org.nz/sirocco/">Donate To Keep Them Partying</a> | |||
<a class="button-small" href="https://www.doc.govt.nz/kakapo-recovery">Donate To Keep Them Partying</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Domain kakaporecovery.org.nz
doesn't seem to have an https certificate, but the link redirects to www.doc.govt.nz
anyway, which does.
fileContents | ||
.toString() | ||
.match(/(http:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*))/gi); | ||
httpLinks = httpLinks ? httpLinks : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.match()
returns null, but it's easier to deal with an empty array.
Top notch stuff, thanks for the effort on this! |
|
||
describe("HTML templates", function() { | ||
it("should not contain un-whitelisted http://", function() { | ||
const whiteList = ['http://www.gtfoparrot.com/']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No choice here- gtfoparrot is hosted on google storage and has no HTTPS cert.