在自己的 wiki 上塞想要的 HTML 元素

如標題寫的... 我是自己 wiki (MediaWiki) 的唯一的作者,所以 XSS 類的問題就先暫時不考慮,目標是增加 <style> 元素可以讓我引用外部字型,也就是我希望能夠用 @import url() 把外部字型引入進來使用。

一開始找到的是 Extension:CSS,但從程式碼裡面的 Hooks.php 這邊可以看到不允許 @import,就只好放掉:

// Do not include @import due to lack of proper security measures

後來找到的是 Extension:HTML Tags 這套,裝好後設定允許 <style> 這個標籤,就可以塞東西進去了,但這個方法還是有不少 css 類的 security risk,主要還是因為我是唯一的作者才能這樣玩。

anyway,現在可以在頁面上直接讀一堆 fonts 進來玩了...

真的有人寄信要 GPL 授權的 copy...

Hacker News 上看到 2022 年的文章:「I wrote to the address in the GPLv2 license notice (2022) (mendhak.com)」,原文在「I wrote to the address in the GPLv2 license notice and received the GPLv3 license」。

作者在 GPLv2 看到這段:

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

在「GNU General Public License v2.0 only」這邊還看得到這段文字,但在 GNU 網站上的「GNU General Public License, version 2」這邊已經拿掉了。

作者就真的寄信給 FSF 請求 GPL 的 copy,附上回郵信封 (郵票還是透過 eBay 買的):

回郵的郵票長這樣:

因為信裡面沒有提到版本,所以他收到的是 GPLv3 的 copy,這點雖然有點好笑 (就如同作者原文的標題),但倒是沒問題,畢竟你在 2022 年沒有指定版本的話,FSF 應該是會給你 GPLv3...

比較有趣的是在 Hacker News 上 id=43784538 這邊提到是他當年處理這封信,特別對那個郵票有印象 XDDD

This is funny because I was the operations assistant (office secretary) at the time we received this letter, and I remember it because of the distinct postage.

另外他在 id=43785749 也提到了這類信的數量:

On average, zero per day, maybe 5 to 10 per year.

真的會回的...

AWS 打算把 us-east-1 拓展到 Maryland

看到 AWS 的公告提到要把 us-east-1 拓展到 Maryland:「In the works – New Availability Zone in Maryland for US East (Northern Virginia) Region」。

us-east-1 有不少機房在 Ashburn,不過 AWS 不會公開提/承認,主要還是各種第三方蒐集的資料:「Amazon AWS: Ashburn Data Centers Locations (15)」。

AWS 要求 AZ 之間必須在 100km 內 (剛好維持光纖來回在 1ms 以下):

All Availability Zones are physically separated in a Region by a meaningful distance, many kilometers (km) from any other Availability Zone, although all are within 100 km (60 miles) of each other.

地圖上看 Maryland 應該是沒問題,就算是到 Baltimore 直線是 80km,但我猜應該不會是 Baltimore,可能是 Washington 外圍這區?大約 50km...

然後又提到台灣區了,不知道什麼時候才會上線:

With this announcement, AWS now has four new Regions in the works—New Zealand, Kingdom of Saudi Arabia, Taiwan, and the AWS European Sovereign Cloud—and 13 upcoming new Availability Zones.

Microsoft 365 將預設關閉 ActiveX?!

在「ActiveX disabled by default in Microsoft 365」這邊看到的消息,原文在微軟自家的站上:「ActiveX disabled by default in Microsoft 365」。

官方公告預設關閉 ActiveX

Starting this month, the Windows versions of Microsoft Word, Microsoft Excel, Microsoft PowerPoint, and Microsoft Visio will have a new default configuration for ActiveX controls: Disable all controls without notification.

然後既有的 ActiveX 物件考能會轉成無法互動的圖片:

Some existing ActiveX objects will still be visible as a static image, but it will not be possible to interact with them.

我的第一個想法是「What The Fxxk」,我以為早就已經消失在現代的電腦上了?直到這篇我去翻資料,才發現雖然一開始的 Edge Legacy 沒支援,但反而在新版的 Edge 加回去了啊啊啊:

Microsoft released Microsoft Edge [Legacy], the replacement for Internet Explorer, with no support for ActiveX; this event marked the end of ActiveX technology in Microsoft's web browser development. Microsoft [New] Edge, however, includes an "Internet Explorer mode" feature, which supports ActiveX.

這也太驚悚了...

帶太陽能板的 Meshtastic Repeater

看到「Solar-powered WisMesh Repeaters extend the range of Meshtastic networks」這個,帶太陽能板的 Meshtastic repeater。

Meshtastic 底層用 LoRa 傳輸資料,維基百科的條目裡有提到,市區傳輸距離大約是 4.8km 左右,郊區則是 16km 左右:

According to the LoRa Development Portal, the range provided by LoRa can be up to 3 miles (4.8 km) in urban areas, and up to 10 miles (16 km) or more in rural areas (line of sight).

用 repeater 把距離拉長在 WiFi 行之有年,LoRa 上面是第一次看到這樣的產品,帶電池與太陽能板以及 IP67 的防塵防水 (Dust-tight + Immersion, up to 1 meter depth):

WisMesh Repeater Mini – 3,200 mAh Li-Ion rechargeable battery; IEC 62133-2:2017 certified
WisMesh Repeater – 10.8V/5,200 mAh Li-Ion rechargeable battery;

IP Rating – IP67

算是自己建 infrastructure 的部分... 感覺沙漠裡可以沿著公路放?另外深山裡面的 sensor 好像也可以靠這招把資料傳出來。

arXiv 要搬到 GCP 上

在「arXiv moving from Cornell servers to Google Cloud (arxiv.org)」這邊看到 arXiv 搬到 GCP 的消息,是出自他們的徵才頁面:「Careers at arXiv - arXiv info」。

We are already underway on the arXiv CE ("Cloud Edition") project. This is a project to re-home all arXiv services from VMs at Cornell to a cloud provider (Google Cloud).

不過看 Hacker News 上的 comment,似乎是受到 Trump 政府對大學資金政策的影響,這些職缺目前是無法應徵的?點了職缺的連結也可以確認目前都沒開...

假設將廣告定義成非法行為?

這是上禮拜在 Hacker News 上看到引起巨大討論的文章:「What if we made advertising illegal? (simone.org)」,原文在「What If We Made Advertising Illegal?」。

這粗看是個激進想法,但仔細去順邏輯時過程中會發現的確是如此:目前 internet 的廣告機制的確就是目前資訊科技中負面的源頭,這在 2019 年的文章「Advertising is a cancer on society」也有提過類似的概念。

透過 Google Translate 的翻譯全文品質還可以 (也可以點「這邊」直接看),我把開頭的部分附在文後,有興趣的人可以直接點進原始網站看原文版本,或是看 Google Translate 的版本。

文章裡面提到的「奧弗頓之窗」指的是:

奧弗頓之窗(英語:Overton window)是有關一段時間內大多數人在政治上可以接受的政策範圍的一種理論。

以下是第一段:

如果我們把所有廣告都定為非法會怎麼樣?這是一個非常瘋狂的想法,我從未在公開討論中聽過。

甚至說這似乎遠遠超出了奧弗頓之窗,這使得核輻射颶風聽起來合理(正如一些政客所提議的那樣)。

但為什麼?這完全說得通。創造令人上癮的數位內容的經濟誘因將立即消失,允許商業和政治參與者創造個人化、扭曲現實的泡沫的機制也將消失:

  • 標題黨、清單文章和聯盟行銷計劃將在一夜之間變得毫無價值。
  • Instagram 和 TikTok 等演算法驅動的平台收集注意力並將其貨幣化,摧毀年輕人,將失去其經濟基礎。
  • Facebook、X、Google、YouTube——它們都將以現有形式不復存在。

廣告公司永遠不會自我監管——這就像希望海洛因販子來制定毒品法一樣。

Arch Linux 打算淘汰掉 Redis,改用 Valkey

Lobsters 上看到 Arch Linux 要用 Valkey 淘汰掉 Redis 的消息:「Valkey to replace Redis in the [extra] Repository」。

Redis 會從官方的 repository 搬到 AUR 上,然後就隨緣:

Arch Linux Package Maintainers intend to support the availability of the redis package for roughly 14 days from the day of this post, to enable a smooth transition to valkey. After the 14 day transition period has ended, the redis package will be moved to the AUR. Also, from this point forward, the redis package will not receive any additional updates and should be considered deprecated until it is removed.

算是開槍了?目前其他的 distribution 大多是共存,從「Search Results for redis」以及「Search Results for valkey」可以看到各套件的情況。

對影片中馬賽克的部分解碼

Hacker News 上「It's easier than ever to de-censor videos (jeffgeerling.com)」看到的,原文在「It's easier than ever to de-censor videos」這邊,在講影片中就算用「馬賽克」,但因為每個影格 (frame) 所馬賽克的範圍不同,是有可能反解出來的。

Jeff Geerling 在今年三月的影片「Who pays $450 for 2TB? (大約在 4:57 的地方)」中提供了一段馬賽克掉的 screencast,提供 US$50 獎賞讓人解:

結果有三組人提供解法給他:

Less than a day later, three people solved it, using three slightly different techniques—scary!

這是其中一組有放到 GitHub 上 (KoKuToru/de-pixelate_gaV-O6NPWrI),可以看到已經解到可以判讀文字了:

就如同作者建議的,很敏感的資料乾脆不要露出會比較好。我的建議是如果真的要露出 demo 的話,用假的資料範例會比較好,再次之的選擇是圖黑。

把 nginx 換成 Caddy

把 blog 主機從 nginx 換成 Caddy,算是嘗試看看?

前面有擋 CloudFront 的情況下,Caddy 自己對 Let's Encrypt 的申請過程會卡住,原因是 CloudFront 連到 origin server 的時候會需要有 valid HTTPS connection,但 CloudFront 上開 HTTPS only 導致 dead loop (雞生蛋蛋生雞的問題)。

所以其中一個方向是把 HTTPS only 的事情讓 origin server 做,不要在 CloudFront 上面處理:在 404.tw 的 CloudFront 修改對 origin 的連線設定,變成與 client 端相同的 protocol 就正常了,但 blog 本身的 blog.gslin.org 與放圖片用的 i.gslin.com 就一直失敗,結果重試太多次撞到 Let's Encrypt 的 rate limit...

後來想到有可能是 cache 造成的,但清了 cache 然後等一個小時後發現還是不行,就先 bypass CloudFront 讓 TLS certificate 申請過,然後再指回去...

另外一點是以為 xcaddy 是把套件裝進去的工具,這次才發現是拿來編一個新的 caddy binary 用的,但這與透過 apt repository 安裝的方式有衝突,所以要搭配官方文件中的「Package support files for custom builds for Debian/Ubuntu/Raspbian」這邊使用,而且後續的版本更新也要自己處理了... 好在現在 Caddy 算穩定,更新頻率不高。

算是再多熟悉了一點?跑跑看效果如何...