Skip to content

Commit fd41987

Browse files
authored
2018-08-07のJS: Chrome 69 Beta、React/Vue/PreactのSSR XSSの修正、Preact 8.3.0 (#536)
* [Chromium Blog: Chrome 69 Beta: CSS tricks, and more](https://blog.chromium.org/2018/08/chrome-69-beta-av1-video-decoder-css.html "Chromium Blog: Chrome 69 Beta: CSS tricks, and more") * [React v16.4.2: Server-side vulnerability fix - React Blog](https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html "React v16.4.2: Server-side vulnerability fix - React Blog") * [Sanitize unknown attribute names for SSR by gaearon · Pull Request #13302 · facebook/react](facebook/react#13302 "Sanitize unknown attribute names for SSR by gaearon · Pull Request #13302 · facebook/react") * [Release 8.3.0 · developit/preact](https://github.com/developit/preact/releases/tag/8.3.0 "Release 8.3.0 · developit/preact") * [Vue.js で XSS を作り込まないために気を付けること - SSTエンジニアブログ](https://techblog.securesky-tech.com/entry/2018/08/01/110000 "Vue.js で XSS を作り込まないために気を付けること - SSTエンジニアブログ") * [Fusion.js Documentation](https://fusionjs.com/ "Fusion.js Documentation") * [Introducing Fusion.js: A Plugin-based Universal Web Framework](https://eng.uber.com/fusionjs/ "Introducing Fusion.js: A Plugin-based Universal Web Framework") * [Deprecations and removals in Chrome 69  |  Web  |  Google Developers](https://developers.google.com/web/updates/2018/08/chrome-69-deps-rems "Deprecations and removals in Chrome 69  |  Web  |  Google Developers") * [Chrome Platform Status](https://www.chromestatus.com/features#browsers.chrome.desktop%3D69 "Chrome Platform Status")
1 parent 744732a commit fd41987

File tree

1 file changed

+260
-0
lines changed

1 file changed

+260
-0
lines changed
Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
---
2+
title: "2018-08-07のJS: Chrome 69 Beta、React/Vue/PreactのSSR XSSの修正、Preact 8.3.0"
3+
author: "azu"
4+
layout: post
5+
date : 2018-08-07T00:52:37.711Z
6+
category: JSer
7+
tags:
8+
- chrome
9+
- react
10+
- vue
11+
- preact
12+
13+
---
14+
15+
JSer.info #395 - Chrome 69 Betaがリリースされました。
16+
17+
- [Chromium Blog: Chrome 69 Beta: CSS tricks, and more](https://blog.chromium.org/2018/08/chrome-69-beta-av1-video-decoder-css.html)
18+
- [Audio/Video Updates in Chrome 69  |  Web  |  Google Developers](https://developers.google.com/web/updates/2018/08/chrome-69-media-updates "Audio/Video Updates in Chrome 69  |  Web  |  Google Developers")
19+
- [Deprecations and removals in Chrome 69  |  Web  |  Google Developers](https://developers.google.com/web/updates/2018/08/chrome-69-deps-rems "Deprecations and removals in Chrome 69  |  Web  |  Google Developers")
20+
- [Chrome Platform Status](https://www.chromestatus.com/features#browsers.chrome.desktop%3D69 "Chrome Platform Status")
21+
22+
CSS conic gradients、CSS scroll snap、CSS `env()` functionのサポートなどCSSの変更が多く行われています。
23+
またOffscreenCanvasや
24+
[ReportingObserver API](https://developers.google.com/web/updates/2018/07/reportingobserver)[Keyboard Map API](https://github.com/WICG/keyboard-map)のサポートなどが行われています。
25+
26+
WebRTCやメディア系のアップデートは[Audio/Video Updates in Chrome 69  |  Web  |  Google Developers](https://developers.google.com/web/updates/2018/08/chrome-69-media-updates "Audio/Video Updates in Chrome 69  |  Web  |  Google Developers")にまとめられています。
27+
28+
---
29+
30+
React 16.4.2でSSR(サーバサイドレンダリング)時に発生するXSSが修正されています。
31+
32+
- [React v16.4.2: Server-side vulnerability fix - React Blog](https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html)
33+
34+
あまりないパターンだと思いますが、タグ文字列を含む任意の値を属性値として使っている場合に、SSR時にその属性値がタグとして出力されてしまう問題が修正されています。
35+
36+
```js
37+
let userProvidedData = '></div><script>alert("hi")</script>';
38+
let props = {};
39+
props[userProvidedData] = "hello";
40+
let element = <div {...props} />;
41+
let html = ReactDOMServer.renderToString(element);
42+
// <div ></div><script>alert("hi")</script>
43+
```
44+
45+
VueとPreactの同様の問題が[Reactチームによって報告](https://github.com/facebook/react/pull/13302)されており、同時に修正がリリースされています。
46+
47+
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">This issue affected Preact (-compat &amp; -render-to-string) as well. It&#39;s been patched in versions 3.18.1 / 3.7.1 of those libraries. Cheers to the React folks for the easy disclosure process. <a href="https://t.co/pN9nnMBDEC">https://t.co/pN9nnMBDEC</a></p>&mdash; Jason Miller 🦊⚛ (@_developit) <a href="https://twitter.com/_developit/status/1024748991458762756?ref_src=twsrc%5Etfw">August 1, 2018</a></blockquote>
48+
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
49+
50+
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Fix for the same issue has been released in Vue 2.5.17. (only affects SSR). Thanks to the React team for coordinating this with us! <a href="https://t.co/WnKS79FjfW">https://t.co/WnKS79FjfW</a></p>&mdash; Vue.js (@vuejs) <a href="https://twitter.com/vuejs/status/1024754536877973504?ref_src=twsrc%5Etfw">August 1, 2018</a></blockquote>
51+
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
52+
53+
----
54+
55+
Preact 8.3.0がリリースされました。
56+
57+
- [Release 8.3.0 · developit/preact](https://github.com/developit/preact/releases/tag/8.3.0)
58+
59+
[React v16.3.0](https://reactjs.org/blog/2018/03/29/react-v-16-3.html)で追加された
60+
`getDerivedStateFromProps``getSnapshotBeforeUpdate`に対応しています。
61+
またmoduleを`.mjs`で出力するように、`setState`の挙動をReactに近づけるように修正などが行われています。
62+
63+
64+
----
65+
66+
<h1 class="site-genre">ヘッドライン</h1>
67+
68+
----
69+
70+
## Node v10.8.0 (Current) | Node.js
71+
[nodejs.org/en/blog/release/v10.8.0/](https://nodejs.org/en/blog/release/v10.8.0/ "Node v10.8.0 (Current) | Node.js")
72+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">node.js</span> <span class="jser-tag">npm</span> <span class="jser-tag">ReleaseNote</span></p>
73+
74+
Node v10.8.0リリース。
75+
npm 6.2.0が同梱されるようになった。
76+
77+
78+
----
79+
80+
## React v16.4.2: Server-side vulnerability fix - React Blog
81+
[reactjs.org/blog/2018/08/01/react-v-16-4-2.html](https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html "React v16.4.2: Server-side vulnerability fix - React Blog")
82+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">ReleaseNote</span> <span class="jser-tag">security</span></p>
83+
84+
React 16.4.2リリース。
85+
SSRにおいてユーザー入力をコンポーネントの属性名に渡せるとXSSが発生する問題を修正。
86+
minorごとに同様のpatchリリースが公開されている。
87+
VueとPreactも同様の問題があり、合わせてsecurity fixがリリースされた。
88+
89+
90+
----
91+
92+
## Release Notes for Safari Technology Preview 62 | WebKit
93+
[webkit.org/blog/8384/release-notes-for-safari-technology-preview-62/](https://webkit.org/blog/8384/release-notes-for-safari-technology-preview-62/ "Release Notes for Safari Technology Preview 62 | WebKit")
94+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">safari</span> <span class="jser-tag">ReleaseNote</span></p>
95+
96+
Safari Technology Preview 62リリース。
97+
ITPデバッグモードの試験的追加、`JSON.stringify`の修正、HLSストリームのキャッシュを無効化、CSS Gridの`gap`プロパティにおける`calc`が動くように修正など
98+
99+
100+
----
101+
102+
## TestCafe v0.21.0 Released | TestCafe
103+
[devexpress.github.io/testcafe/blog/testcafe-v0-21-0-released.html](http://devexpress.github.io/testcafe/blog/testcafe-v0-21-0-released.html "TestCafe v0.21.0 Released | TestCafe")
104+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">browser</span> <span class="jser-tag">testing</span> <span class="jser-tag">E2E</span> <span class="jser-tag">ReleaseNote</span></p>
105+
106+
TestCafe v0.21.0リリース。
107+
テストページをHTTPSでアクセスできるように、スクリーンショットのパスに変数を使えるようになるなど
108+
109+
110+
----
111+
112+
## Dojo Version 3.0 | Dojo
113+
[dojo.io/blog/2018/07/27/2018-07-27-Dojo-version-3-release/](https://dojo.io/blog/2018/07/27/2018-07-27-Dojo-version-3-release/ "Dojo Version 3.0 | Dojo")
114+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">library</span> <span class="jser-tag">ReleaseNote</span></p>
115+
116+
Dojo 3.0リリース。
117+
パッケージが細かく別れていたものを`@dojo/framework`に統合して利用できるように変更。マイグレーションスクリプトも公開されている。
118+
119+
- [framework/V3-Migration-Guide.md at master · dojo/framework](https://github.com/dojo/framework/blob/master/docs/V3-Migration-Guide.md "framework/V3-Migration-Guide.md at master · dojo/framework")
120+
121+
----
122+
123+
## ESLint v5.3.0 released - ESLint - Pluggable JavaScript linter
124+
[eslint.org/blog/2018/08/eslint-v5.3.0-released](https://eslint.org/blog/2018/08/eslint-v5.3.0-released "ESLint v5.3.0 released - ESLint - Pluggable JavaScript linter")
125+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">ESLint</span> <span class="jser-tag">ReleaseNote</span></p>
126+
127+
ESLint 5.3.0リリース。
128+
正規表現に関するルールが2つ、Async Functionに関するルールが2つ追加された。
129+
130+
- [ESLint v5.3.0 - Qiita](https://qiita.com/mysticatea/items/eb99e18d6cc7c3bf9317 "ESLint v5.3.0 - Qiita")
131+
- [Promise のコンストラクタに渡した async function 内で throw しても rejected な Promise は作られない(常に fulfilled になる) - Humanity](http://tyru.hatenablog.com/entry/2018/08/04/220530 "Promise のコンストラクタに渡した async function 内で throw しても rejected な Promise は作られない(常に fulfilled になる) - Humanity")
132+
133+
----
134+
135+
## Release 8.3.0 · developit/preact
136+
[github.com/developit/preact/releases/tag/8.3.0](https://github.com/developit/preact/releases/tag/8.3.0 "Release 8.3.0 · developit/preact")
137+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">library</span> <span class="jser-tag">ReleaseNote</span></p>
138+
139+
Preact 8.3.0リリース。
140+
`getDerivedStateFromProps``getSnapshotBeforeUpdate`に対応。moduleを`.mjs`で出力するように、`setState`の挙動をReactに近づけるように修正など
141+
142+
143+
----
144+
145+
## Chromium Blog: Chrome 69 Beta: CSS tricks, and more
146+
[blog.chromium.org/2018/08/chrome-69-beta-av1-video-decoder-css.html](https://blog.chromium.org/2018/08/chrome-69-beta-av1-video-decoder-css.html "Chromium Blog: Chrome 69 Beta: CSS tricks, and more")
147+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">Chrome</span> <span class="jser-tag">ReleaseNote</span></p>
148+
149+
Chrome 69βリリース。 CSS conic gradients、CSS scroll snap、CSS `env()` functionのサポート。
150+
ReportingObserver API、Keyboard Map APIのサポートなど
151+
152+
- [Audio/Video Updates in Chrome 69  |  Web  |  Google Developers](https://developers.google.com/web/updates/2018/08/chrome-69-media-updates "Audio/Video Updates in Chrome 69  |  Web  |  Google Developers")
153+
- [Deprecations and removals in Chrome 69  |  Web  |  Google Developers](https://developers.google.com/web/updates/2018/08/chrome-69-deps-rems "Deprecations and removals in Chrome 69  |  Web  |  Google Developers")
154+
- [Chrome Platform Status](https://www.chromestatus.com/features#browsers.chrome.desktop%3D69 "Chrome Platform Status")
155+
156+
----
157+
<h1 class="site-genre">アーティクル</h1>
158+
159+
----
160+
161+
## Vue.js で XSS を作り込まないために気を付けること - SSTエンジニアブログ
162+
[techblog.securesky-tech.com/entry/2018/08/01/110000](https://techblog.securesky-tech.com/entry/2018/08/01/110000 "Vue.js で XSS を作り込まないために気を付けること - SSTエンジニアブログ")
163+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">Vue</span> <span class="jser-tag">security</span> <span class="jser-tag">article</span> <span class="jser-tag">XSS</span></p>
164+
165+
Vue.jsでXSSが発生するポイントについての解説。
166+
`v-html``href`のバインディグ、サーバサイドのテンプレートとCSRでのエスケープ漏れなどについて
167+
168+
169+
----
170+
171+
## JSDocで型チェックする - Qiita
172+
[qiita.com/shisama/items/016288d38165d542fffd](https://qiita.com/shisama/items/016288d38165d542fffd "JSDocで型チェックする - Qiita")
173+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">TypeScript</span> <span class="jser-tag">article</span></p>
174+
175+
TypeScriptの`allowJs``checkJs`を使ったJavaScriptでの型チェックについて。
176+
JSDocで書いた型アノテーションや型定義ファイルを元に型チェックを行う方法について
177+
178+
179+
----
180+
181+
## The Cost Of JavaScript In 2018 – Addy Osmani – Medium
182+
[medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4](https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4 "The Cost Of JavaScript In 2018 – Addy Osmani – Medium")
183+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">article</span> <span class="jser-tag">performance</span></p>
184+
185+
JavaScriptのパフォーマンスコストについての記事。
186+
ファイルサイズ、ロード時間、インタラクティブになるまでの時間、モバイルや低スペックマシンでのコスト。
187+
またパフォーマンスを改善するパターンなどについて
188+
189+
190+
----
191+
192+
## I created the exact same app in React and Vue. Here are the differences.
193+
[medium.com/javascript-in-plain-english/i-created-the-exact-same-app-in-react-and-vue-here-are-the-differences-e9a1ae8077fd](https://medium.com/javascript-in-plain-english/i-created-the-exact-same-app-in-react-and-vue-here-are-the-differences-e9a1ae8077fd "I created the exact same app in React and Vue. Here are the differences.")
194+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">Vue</span> <span class="jser-tag">React</span> <span class="jser-tag">article</span></p>
195+
196+
VueとReactで同じTodoアプリを作って比較する記事。
197+
処理ごとにそれぞれのやり方を比較して紹介している。
198+
199+
200+
----
201+
202+
## ちゃんと理解するCode Splitting - Qiita
203+
[qiita.com/seya/items/06b160adb7801ae9e66f](https://qiita.com/seya/items/06b160adb7801ae9e66f "ちゃんと理解するCode Splitting - Qiita")
204+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">webpack</span> <span class="jser-tag">article</span> <span class="jser-tag">JavaScript</span></p>
205+
206+
webpackにおけるCode Splittingの動作の解説。Code Splittingのメリットとデメリット。
207+
Code SplittingするUIのパターンやDynamic Import、`webpackPrefetch`オプション、VueやReactでの対応についてなど
208+
209+
210+
----
211+
<h1 class="site-genre">スライド、動画関係</h1>
212+
213+
----
214+
215+
## Storybook Tutorial
216+
[www.learnstorybook.com/](https://www.learnstorybook.com/ "Storybook Tutorial")
217+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">Angular</span> <span class="jser-tag">Vue</span> <span class="jser-tag">tutorial</span></p>
218+
219+
Storybookのチュートリアル。
220+
React、Angular、Vueに対応したStirybookでのコンポーネント開発やChromaticを使ったビジュアルテストなどについて書かれている
221+
222+
- [Chromatic visual testing for React](https://www.chromaticqa.com/ "Chromatic visual testing for React")
223+
224+
----
225+
<h1 class="site-genre">サイト、サービス、ドキュメント</h1>
226+
227+
----
228+
229+
## Frontend News
230+
[frontendnews.io/](https://frontendnews.io/ "Frontend News")
231+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">CSS</span> <span class="jser-tag">DOM</span> <span class="jser-tag">JavaScript</span> <span class="jser-tag">mail</span> <span class="jser-tag">web</span></p>
232+
233+
フロントエンドに関する1週間に1つのTipsについてを更新するサイト
234+
235+
236+
----
237+
<h1 class="site-genre">ソフトウェア、ツール、ライブラリ関係</h1>
238+
239+
----
240+
241+
## Fusion.js Documentation
242+
[fusionjs.com/](https://fusionjs.com/ "Fusion.js Documentation")
243+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">library</span> <span class="jser-tag">plugin</span> <span class="jser-tag">browser</span> <span class="jser-tag">node.js</span></p>
244+
245+
UberのプラグインベースなBrowser/Node.jsウェブフレームワーク。コアにプラグインの仕組みとDIの仕組みを持ち、ReactやRedux、KoaなどUberがよく利用しているものをプラグインとして導入できる。
246+
webpackやbabelなどをラップするcliがあり、create-react-appのように設定ファイルを触らずに開発ができる。
247+
248+
- [Introducing Fusion.js: A Plugin-based Universal Web Framework](https://eng.uber.com/fusionjs/ "Introducing Fusion.js: A Plugin-based Universal Web Framework")
249+
250+
----
251+
252+
## sasha240100/between.js: Lightweight JavaScript (ES6) tweening engine
253+
[github.com/sasha240100/between.js](https://github.com/sasha240100/between.js "sasha240100/between.js: Lightweight JavaScript (ES6) tweening engine")
254+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">library</span></p>
255+
256+
AからBへ値の変化を扱えるライブラリ。
257+
Tweening animationのような特定のイージングやループでの値の変化を扱う。
258+
259+
260+
----

0 commit comments

Comments
 (0)