qiita-markdown 0.33.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17dc016afba392cc6e3ea77af4cdc445e32c6004a6c23a24b8dce1a4e0ec1811
4
- data.tar.gz: 042e3a11a8cc6d266463ae7bb8d3e46c8c732efeb061086586c80a277898cf38
3
+ metadata.gz: 930ee5ee8bc770b95b918f3cfed4fdac57f133e9e69d0b21fff77cd2506a8fdc
4
+ data.tar.gz: 87f95cb871e08f94e1e03dd11a14ddd974ee24726b78ae3496bd3629e3b76959
5
5
  SHA512:
6
- metadata.gz: 0c59646956b877c13e7c6ef62bd366483b5a7da78f19bfe8aee2305ea568c6f59dfb2d916e68a822e3363ddabbf7577166e8e21a8da79152550b11c77a3dc8d6
7
- data.tar.gz: b907d5a284c9c77e9f264298d38d6ec4a0861179dda36320f6fd40187b606662b1e07e61d9f3e5bd2070f203e3de5d60b53cdb05593ca64ceb875c6bbd811f31
6
+ metadata.gz: 0ac7943de01ab9b05c990f6ec8abe64d37c780b186da66b30017129f014d7944aa60e437a9466033b2c801dd701fdf6564d30451bc2ece1d6551011ff44d814b
7
+ data.tar.gz: cb8bd175dcd7aec1685209eca0c51c396a80d686737267155d1815d98546f65d7fa5927cf525cb109ed777a5a92835239f59d46e70f246e8ddb1bd9b8f7ebac5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.34.0
4
+
5
+ - Delete gist embed rule to avoid XSS
6
+
3
7
  ## 0.33.0
4
8
 
5
9
  - Fix XSS possibility bug
@@ -10,7 +10,6 @@ require "sanitize"
10
10
  require "qiita/markdown/embed/code_pen"
11
11
  require "qiita/markdown/embed/tweet"
12
12
  require "qiita/markdown/embed/asciinema"
13
- require "qiita/markdown/embed/gist"
14
13
  require "qiita/markdown/embed/youtube"
15
14
  require "qiita/markdown/embed/slide_share"
16
15
  require "qiita/markdown/embed/google_slide"
@@ -10,7 +10,6 @@ module Qiita
10
10
 
11
11
  HOST_WHITE_LIST = [
12
12
  Embed::Asciinema::SCRIPT_HOST,
13
- Embed::Gist::SCRIPT_HOST,
14
13
  ].flatten.freeze
15
14
 
16
15
  def self.call(*args)
@@ -1,5 +1,5 @@
1
1
  module Qiita
2
2
  module Markdown
3
- VERSION = "0.33.0"
3
+ VERSION = "0.34.0"
4
4
  end
5
5
  end
@@ -1451,28 +1451,6 @@ describe Qiita::Markdown::Processor do
1451
1451
  end
1452
1452
  end
1453
1453
 
1454
- context "with HTML embed code for Gist" do
1455
- let(:markdown) do
1456
- <<-MARKDOWN.strip_heredoc
1457
- <script id="example" src="https://gist.github.com/a/example.js"></script>
1458
- MARKDOWN
1459
- end
1460
-
1461
- if allowed
1462
- it "does not sanitize embed code" do
1463
- should eq <<-HTML.strip_heredoc
1464
- <script id="example" src="https://gist.github.com/a/example.js"></script>
1465
- HTML
1466
- end
1467
- else
1468
- it "forces async attribute on script" do
1469
- should eq <<-HTML.strip_heredoc
1470
- <script id="example" src="https://gist.github.com/a/example.js" async="async"></script>
1471
- HTML
1472
- end
1473
- end
1474
- end
1475
-
1476
1454
  context "with HTML embed code for Youtube" do
1477
1455
  let(:markdown) do
1478
1456
  <<-MARKDOWN.strip_heredoc
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.0
4
+ version: 0.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-18 00:00:00.000000000 Z
11
+ date: 2021-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gemoji
@@ -258,7 +258,6 @@ files:
258
258
  - lib/qiita/markdown/base_processor.rb
259
259
  - lib/qiita/markdown/embed/asciinema.rb
260
260
  - lib/qiita/markdown/embed/code_pen.rb
261
- - lib/qiita/markdown/embed/gist.rb
262
261
  - lib/qiita/markdown/embed/google_slide.rb
263
262
  - lib/qiita/markdown/embed/slide_share.rb
264
263
  - lib/qiita/markdown/embed/speeker_deck.rb
@@ -1,9 +0,0 @@
1
- module Qiita
2
- module Markdown
3
- module Embed
4
- module Gist
5
- SCRIPT_HOST = "gist.github.com".freeze
6
- end
7
- end
8
- end
9
- end