Skip to content

Commit 2af77c0

Browse files
committed
Fix the security of cross-origin destinations link.
1 parent cc68536 commit 2af77c0

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

_data/meta.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
name: Chirpy
22
version: v2.5.1
3+
homepage: https://github.com/cotes2020/jekyll-theme-chirpy/

_includes/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
<div class="footer-right">
2323
<p class="mb-0">
2424
Powered by
25-
<a href="https://jekyllrb.com" target="_blank">Jekyll</a>
25+
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
2626
with
27-
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/">Chirpy</a>
27+
<a href="{{ site.data.meta.homepage }}" target="_blank" rel="noopener">{{ site.data.meta.name }}</a>
2828
theme.
2929
</p>
3030
</div>

_includes/post-sharing.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{% for share in site.data.share.platforms %}
1717
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
1818
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
19-
title="{{ share.type }}" target="_blank">
19+
title="{{ share.type }}" target="_blank" rel="noopener">
2020
<i class="fa-fw {{ share.icon }}"></i>
2121
</a>
2222
{% endfor %}
@@ -25,4 +25,4 @@
2525
data-toggle="tooltip" data-placement="top" title="Copy link"></i>
2626

2727
</span>
28-
</div>
28+
</div>

_includes/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
{% endcapture %}
8282

8383
{% if url != '' %}
84-
<a href="{{ url }}" {% unless entry.noblank %}target="_blank"{% endunless %}>
84+
<a href="{{ url }}" {% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}>
8585
<i class="{{ entry.icon }}"></i>
8686
</a>
8787
{% endif %}

0 commit comments

Comments
 (0)