Skip to content

Commit bd9e804

Browse files
security: Adds rel="noopener" to all target="_blank" (#494)
* security: Adds rel="noopener" to all target="_blank" * feature: Adds additonal rel="noopener" Co-authored-by: Peter Kos <[email protected]>
1 parent 95f737e commit bd9e804

File tree

11 files changed

+20
-19
lines changed

11 files changed

+20
-19
lines changed

app/views/application/_questionnaire_summary.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
= Questionnaire::POSSIBLE_EXPERIENCES[@questionnaire.experience]
88
%p
99
%b Portfolio link:
10-
= @questionnaire.portfolio_url? ? link_to(@questionnaire.portfolio_url, @questionnaire.portfolio_url, target: '_blank') : 'Not provided'
10+
= @questionnaire.portfolio_url? ? link_to(@questionnaire.portfolio_url, @questionnaire.portfolio_url, target: '_blank', rel: 'noopener') : 'Not provided'
1111
%p
1212
%b GitHub/GitLab/Bitbucket link:
13-
= @questionnaire.vcs_url? ? link_to(@questionnaire.vcs_url, @questionnaire.vcs_url, target: '_blank') : 'Not provided'
13+
= @questionnaire.vcs_url? ? link_to(@questionnaire.vcs_url, @questionnaire.vcs_url, target: '_blank', rel: 'noopener') : 'Not provided'
1414
%p
1515
%b Resume:
1616
= @questionnaire.resume.attached? ? link_to("Download &raquo;".html_safe, @questionnaire.resume) : 'Not provided'

app/views/layouts/manage/application.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@
124124
.nav-item-description
125125
= t(:doorkeeper, scope: 'layouts.manage.navigation.descriptors')
126126
%li.nav-item
127-
= active_link_to sidekiq_web_path, target: '_blank', class: "nav-link" do
127+
= active_link_to sidekiq_web_path, target: '_blank', rel: "noopener", class: "nav-link" do
128128
.fa.fa-tasks.fa-fw.icon-space-r-half
129129
= t(:title, scope: 'pages.manage.sidekiq')
130130
%span.fa.fa-external-link.icon-space-l-half
131131
.nav-item-description
132132
= t(:sidekiq, scope: 'layouts.manage.navigation.descriptors')
133133
%li.nav-item
134-
= active_link_to blazer_path, target: '_blank', class: "nav-link" do
134+
= active_link_to blazer_path, target: '_blank', rel: "noopener", class: "nav-link" do
135135
.fa.fa-terminal.fa-fw.icon-space-r-half
136136
= t(:title, scope: 'pages.manage.blazer')
137137
%span.fa.fa-external-link.icon-space-l-half

app/views/manage/messages/_templating.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
%p
44
Message bodies can make use of template variables to help personalize and streamline emails.
5-
Templating is powered by <a target="_blank" href="https://mustache.github.io/mustache.5.html">mustache</a>.
5+
Templating is powered by <a target="_blank" rel="noopener" href="https://mustache.github.io/mustache.5.html">mustache</a>.
66

77
%table.table.table-striped
88
%thead

app/views/manage/messages/template.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
.form-inputs
2323
%h5.mb-3 Customize template
2424
%p.text-secondary Must save to update preview. CSS will be converted to inline styles when messages are sent.
25-
%p.text-secondary Be sure to test with as many email providers as possible! <a href="https://putsmail.com" target="blank">Litmus PutsMail</a> is one great resource.
25+
%p.text-secondary Be sure to test with as many email providers as possible! <a href="https://putsmail.com" target="_blank" rel="noopener">Litmus PutsMail</a> is one great resource.
2626
= f.input :html, input_html: { 'data-code-mirror-textarea' => '1' }, label: false, wrapper: :bootstrap_inline_form
2727

2828
.form-actions.mt-3.mb-3

app/views/manage/questionnaires/_overview.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
= Questionnaire::POSSIBLE_EXPERIENCES[@questionnaire.experience]
8787
%dt.col-md-4 Portfolio
8888
%dd.col-md-8
89-
= @questionnaire.portfolio_url? ? link_to(@questionnaire.portfolio_url, @questionnaire.portfolio_url, target: '_blank') : not_provided
89+
= @questionnaire.portfolio_url? ? link_to(@questionnaire.portfolio_url, @questionnaire.portfolio_url, target: '_blank', rel: 'noopener') : not_provided
9090
%dt.col-md-4 GitHub/GitLab/Bitbucket
9191
%dd.col-md-8
92-
= @questionnaire.vcs_url? ? link_to(@questionnaire.vcs_url, @questionnaire.vcs_url, target: '_blank') : not_provided
92+
= @questionnaire.vcs_url? ? link_to(@questionnaire.vcs_url, @questionnaire.vcs_url, target: '_blank', rel: 'noopener') : not_provided
9393
%dt.col-md-4 Resume
9494
%dd.col-md-8
9595
= @questionnaire.resume.attached? ? link_to("Download &raquo;".html_safe, @questionnaire.resume) : not_provided

app/views/manage/schools/show.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
= @school.name
2626
%br
2727
%small
28-
= link_to google_maps_link(@school.name), target: '_blank' do
28+
= link_to google_maps_link(@school.name), target: '_blank', rel: 'noopener' do
2929
Search in Google Maps
3030
%span.fa.fa-external-link.icon-space-l-half
3131
%dt.col-md-4 Address
@@ -37,7 +37,7 @@
3737
%br
3838
%small
3939
- link = google_maps_link(@school.address, @school.city, @school.state)
40-
= link_to link, target: '_blank' do
40+
= link_to link, target: '_blank', rel: 'noopener' do
4141
Search in Google Maps
4242
%span.fa.fa-external-link.icon-space-l-half
4343
%dt.col-md-4 Home school

db/seed_messages/questionnaire--accepted.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
You have been accepted to attend {{hackathon_name}}! **Please RSVP:**
44

55
<p>
6-
<a href="{{accept_rsvp_url}}" class="button" target="_blank">Yes, I will Attend &raquo;</a>
7-
<a href="{{deny_rsvp_url}}" class="button" target="_blank">No, I Can't Attend &raquo;</a>
6+
<a href="{{accept_rsvp_url}}" class="button" target="_blank" rel="noopener">Yes, I will Attend &raquo;</a>
7+
<a href="{{deny_rsvp_url}}" class="button" target="_blank" rel="noopener">No, I Can't Attend &raquo;</a>
88
<br>
9-
<small><i>Link not working? Go to <a href="{{rsvp_url}}">{{rsvp_url}}</a></i></small>
9+
<small><i>Link not working? Go to <a href="{{rsvp_url}}" target="_blank" rel="noopener">{{rsvp_url}}</a></i></small>
1010
</p>

db/seed_messages/questionnaire--denied.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
It is with our sincerest regret to inform you that our admissions committee has chosen to not accept your application to {{hackathon_name}} at this time. We were overjoyed with the number of applicants we received, but unfortunately we can not accept everyone.
44

5-
We invite you to apply again next year. There are plenty of other hackathons this season, and it may not be too late to apply for those. Checkout <a href="https://mlh.io" target="_blank">https://mlh.io</a> to find out more information.
5+
We invite you to apply again next year. There are plenty of other hackathons this season, and it may not be too late to apply for those. Checkout <a href="https://mlh.io" target="_blank" rel="noopener">https://mlh.io</a> to find out more information.
66

77
Thank you for applying,<br>
88
- The {{hackathon_name}} Team

db/seed_messages/questionnaire--rsvp_reminder.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<h1>Are you coming to {{hackathon_name}}?</h1>
55
<h3>Let us know if we should expect you there!</h3>
66
<p>
7-
<a href="{{accept_rsvp_url}}" class="button" target="_blank">Yes, I will Attend &raquo;</a>
8-
<a href="{{deny_rsvp_url}}" class="button" target="_blank">No, I Can't Attend &raquo;</a>
7+
<a href="{{accept_rsvp_url}}" class="button" target="_blank" rel="noopener">Yes, I will Attend &raquo;</a>
8+
<a href="{{deny_rsvp_url}}" class="button" target="_blank" rel="noopener">No, I Can't Attend &raquo;</a>
99
<br>
10-
<small><i>Link not working? Go to <a href="{{rsvp_url}}">{{rsvp_url}}</a></i></small>
10+
<small><i>Link not working? Go to <a href="{{rsvp_url}}" target="_blank" rel="noopener">{{rsvp_url}}</a></i></small>
1111
</p>
1212
</div>

website/core/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Footer extends React.Component {
4646
<div />
4747
<div>
4848
<h5>More</h5>
49-
<a href={this.props.config.repoUrl} target="_blank">
49+
<a href={this.props.config.repoUrl} target="_blank" rel="noopener">
5050
GitHub Repo
5151
</a>
5252
<a

0 commit comments

Comments
 (0)