HTML 裡 head 的整理...

HEAD - A free guide to <head> elements」這篇整理了 HTML 裡 <head> 的標準,以及網路上夠大的廠商所定義的標準 (另外還把中國的瀏覽器也拉出來)。

從目錄就可以看出來講了哪些:

另外一種看法就是,你要怎麼樣讓你的 <head> 塞滿垃圾然後變得很肥... XD

MDN 上的 CSS Layout cookbook

MDN 上看到「CSS Layout cookbook」,目前整理了六種情境,包括了設計方式與瀏覽器的支援度。

看到「Center an element」有種苦笑的感覺啊... 以前弄這個都是 workaround,現在都有對應的 CSS 可以處理了。

相對路徑的攻擊方式 (Relative Path Overwite,RPO)

在「Large-scale analysis of style injection by relative path overwrite」這邊看到的,記得這個方式不是新方法,不過還是有人會中...

這種攻擊是組合技,基礎是引用 css 或是 js 時使用相對路徑 (像是 static/style.css 這樣的引用法),再加上 https://www.example.com/a.php 這樣的頁面通常也可以吃 https://www.example.com/a.php/,甚至是後面再加東西... 在某些情境下組不出來,但精心策劃後就有機會在頁面上弄出奇怪的 xss 或是其他攻擊了。而論文內列出了常見的的組合:

然後拿 Alexa 的排名來看,其實還是有些站台可以打:

防禦的方式也不算太難,absolute path 是個還不錯的方式:

One option is to use only absolute URLs, taking away the relative path expansion.

base tag 也是個方式 (不過在 IE 上還是有問題):

Alternatively you can specify a base tag, though Internet Explorer did not appear to implement the tag correctly (i.e., was still vulnerable) at the time of the evaluation.

另外作者也提到了 document type 的方式 (看起來是建議用 html5 的 <!DOCTYPE html>),然後 IE 另外做些處理避免失效:

One of the best mitigations is to avoid exploitation by declaring a modern document type that causes rendering in standards compliant mode. This defeats the attack in all browsers apart from IE. For IE it is also necessary to prevent the page being loaded in a frame by using X-Frame-Options , using X-Content-Type-Options to disable ‘content type sniffing,’ and X-UA-Compatible to turn off IE’s compatibility view.

不過大型站台本來就因為業務需求,會把 asset domain 切開 (然後透過 CDN 加速),而且會設計系統讓 programmer 很容易使用這樣的架構,反而因此比較不會用到 relative path,中這個攻擊的機會就低多了...

直接從 IMDb 編號看影片

看到「Now Anyone Can Embed a Pirate Movie in a Website」這邊介紹的東西,直接輸入 IMDb 的編號 (包括 tt 開頭的那串編號),他就自動拉出 embed code:

然後可以直接線上觀看:

然後還支援字幕 (唔):

Interestingly, should one of those sources be Google Video, Vodlocker says its player offers Chromecast and subtitle support.

官網有寫來源是到處找:

VoDLocker searches all general video hosters like youtube, google drive, openload...

看起來整塊技術其實都是現成的。透過 search engine 加上定期的檢查機制與回報機制就可以做完 @_@

VMware 的 vSphere HTML5 Web Client

vSphere HTML5 Web Client 算是 VMware 對 HTML5 的嘗試,在 HTML5 技術夠彈性的情況下避開使用 Flash 技術的 Web Client。

就畫面上看起來還不錯... 基本的操作應該可以搞定了,之後應該有機會可以拿來玩看看 :o

Google Chrome 53 要再限縮 Flash 的使用

Google Chrome 53 將會再度限縮 Flash 的使用情境:「Flash and Chrome」。

Today, more than 90% of Flash on the web loads behind the scenes to support things like page analytics. This kind of Flash slows you down, and starting this September, Chrome 53 will begin to block it.

而到了 55 的時候會再縮,只有 Chrome 裡面白名單的網站才支援 Flash:

In December, Chrome 55 will make HTML5 the default experience, except for sites which only support Flash.

VMware 宣佈 Windows 上的 vSphere Client 退役

VMware 宣佈 Windows 上用 C# 寫的 vSphere Client 退役,發表 HTML5 版本:「Goodbye vSphere Client for Windows (C#) – Hello HTML5」,畫面長這樣:

總算是推出計畫換用 HTML5 了,之前 Web 版用 Flash 慢到炸...

用瀏覽器看 Netflix 加速播放

前陣子開始用 Netflix 看流言終結者,但以往看動畫已經習慣至少兩倍速了,舊址好找看看電腦上有沒有方案可以加速。

還頗幸運的是,早就有人把方法找出來了:「Netflix streaming playback speed and hidden menus」。

Netflix 在 Google Chrome 上面用 HTML5 player,而就有 extension 可以對 HTML5 player 加速:「Video Speed Controller」。

這樣消化影片的速度就快多了 :p

Google 宣佈 2017 年完全停止 Flash 廣告

在「Google will stop running Flash display ads on January 2, 2017」這邊看到的,引用自 Google Plus 上的說明:「Google display ads go 100% HTML5」,主要有兩個時程:

- Starting June 30th, 2016, display ads built in Flash can no longer be uploaded into AdWords and DoubleClick Digital Marketing.
- Starting January 2nd, 2017, display ads in the Flash format can no longer run on the Google Display Network or through DoubleClick.

今年六月底之後將無法上傳新的 Flash 廣告,並且在明年停止使用。