升級到 WordPress 6.3 遇到的問題

WordPress 6.3 出了:「WordPress 6.3 “Lionel”」,順手按了升級就爛掉了,發現是 admin 介面爛掉,網站本身還能瀏覽,先翻出 PHP 的錯誤訊息:

2023/08/09 04:52:32 [error] 845702#845702: *1350433 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function W3TC\Util_Environment::is_dbcluster(), 0 passed in /srv/blog.gslin.org/public/wp-content/db.php on line 56 and exactly 1 expected in /srv/blog.gslin.org/public/wp-content/plugins/w3-total-cache/Util_Environment.php:176

順著這個訊息找到這個算新的討論:「Fatal error in Util_Environment」,看起來跟 W3 Total Cache 有關。

(話說這個錯誤訊息還比較新,Kagi 上面找不到,後來是在 DuckDuckGo 上找到)

解法就比較粗暴一點,先到 wp-content/plugins 下讓 W3 Total Cache 失效:

sudo chmod 000 w3-total-cache

跑完升級後會出現錯誤訊息提示 W3 Total Cache 沒有啟用,這時候再開回來:

sudo chmod 755 w3-total-cache

後續把 cache 都清掉就正常了。

Gandi 被併購

看到 Hacker News Daily 上面的消息才知道被並夠了:「Domain registrar Gandi gets bought out, removes free mailboxes (afront.org)」。翻了維基百科後看到「Gandi & TWS Join Forces to Form Your.Online」這篇新聞稿。

Total Webhosting Solutions 這家公司可以從 Crunchbase 查到是 2017 成立的:「Total Webhosting Solutions - Crunchbase Company Profile & Funding」,另外找了一下新聞,會發現這家公司在 2020 年的時候買了一堆公司,然後 2021 年沈寂了一陣子,又在 2022 年開始買:「Total Webhosting Solutions Archives - Hosting Journalist.com」。

還看不太懂這家公司在搞什麼...

今天釋出的 Firefox 86 推出了 Total Cookie Protection

Firefox 86 (新推出的 standard 版本) 推出了 Total Cookie Protection:「Firefox 86 Introduces Total Cookie Protection」。

每個站的 cookie 都有獨立的空間:

Our new feature, Total Cookie Protection, works by maintaining a separate “cookie jar” for each website you visit. Any time a website, or third-party content embedded in a website, deposits a cookie in your browser, that cookie is confined to the cookie jar assigned to that website, such that it is not allowed to be shared with any other website.

然後對於需要跨站類的應用另外處理,像是 3rd-party login:

In addition, Total Cookie Protection makes a limited exception for cross-site cookies when they are needed for non-tracking purposes, such as those used by popular third-party login providers. Only when Total Cookie Protection detects that you intend to use a provider, will it give that provider permission to use a cross-site cookie specifically for the site you’re currently visiting. Such momentary exceptions allow for strong privacy protection without affecting your browsing experience.

這樣的確把 cookie 的追蹤能力壓低很多,不過應該也會有不少站台掛掉...

W3 Total Cache 0.9.2.6 的災情慘重...

W3 Total Cache 出了新版,升級上去後 WordPress 就爛掉了,最後是先 downgrade 到 0.9.2.5,然後再進系統把 W3 Total Cache 完全 deactive...

有看到升級資訊的人可以先等一下,這次的 0.9.2.5 到 0.9.2.6 不是 minor version upgrade:

-rw-r--r--   1 gslin  staff   854455 Feb  6 04:12 w3-total-cache.0.9.2.3.zip
-rw-r--r--   1 gslin  staff   915186 Feb  6 04:11 w3-total-cache.0.9.2.4.zip
-rw-r--r--   1 gslin  staff   915384 Feb  6 04:02 w3-total-cache.0.9.2.5.zip
-rw-r--r--   1 gslin  staff  1292961 Feb  6 04:11 w3-total-cache.0.9.2.6.zip

看起來這個作者沒什麼版本號的觀念,之後升級他的東西小心一點... XD

W3 Total Cache 安全性問題...

在「W3 Total Cache Implementation Vulnerability」這篇說明了 WordPress 知名外掛 W3 Total Cache 的安全性問題,原來的在通報在 Full Disclosure Mailing List 上:「WordPress Remote Exploit - W3 Total Cache」。

當沒有 opcode cache (像是 APC) 而使用 disk DB cache 時,會有安全性問題。

除了關掉 DB cache 以外,目前的 workaround 建議是針對 /wp-content/w3tc/dbcache 擋掉,像是用 .htaccess 擋:

#
deny from all

WordPress plugins 安全性問題

TechCrunch 上看到 WordPress.org 強制所有 WordPress.org 的使用者更新密碼 (不是 WordPress.com):「WordPress.org Forces Password Resets Due To Compromised Plugins」。

起因是 AddThisWPtouch 以及 W3 Total Cache 這三個 plugin 有異常 commit 塞入 backdoor code。(瞬間就中兩槍)

這幾天有更新 plugin 的人最好趕快看一下... 慘啊 :/

W3 Total Cache 0.9.2 與 0.9.2.1 的問題...

W3 Total Cache 最近的版本更新把一堆站台弄壞 (很像是 css naked day?XD),可以在 Plugin 網頁的回報資訊看出來:

後來在 forum 上看到有人提:「[Plugin: W3 Total Cache] Minify just won't work」,於是先手動把 minify 功能關閉測試,發現這樣就正常許多,發現看起來應該是跟 minify 有關的問題...

有遇到的人不需要把 W3 Total Cache 全關,還是可以用其他功能加速並降低負載...

Blog 關掉 CloudFront CDN...

剛剛用手機看自己的 blog 發現版面亂掉,看起來是 CSS 有問題...

測了一些東西後發現,如果 W3 Total Cache 使用 CloudFront CDN,會使得 WPTouch 失效,拿掉 CDN 的部份就會恢復正常...

那只好先拿掉了,現在用手機看 blog 的人應該就正常了...