Home » Posts tagged "dash"

直接在 Ubuntu 的 Unity 上直接計算

Mac 上還蠻常直接在 Spotlight 上打簡單的算式看計算的結果,但我的桌機是在 Ubuntu 上,沒看到這個功能,所以都是用 search engine 幫忙算 (以前是 Google,現在是 DuckDuckGo),但還是想要找個類似的東西看看能不能在本機處理掉...

後來在「Can you get something like Unity Dash--especially the instant calculator--in other distros?」這邊看到 screenshot 的效果應該就是我想要的:

不過發現預設好像不會開 (跟文章裡面提到的不太一樣),所以又找了一段時間,發現在「How to permanently enable in-dash calculator in 13.10」這邊,River Satya 提到的方式是我要的:

  • Install dconf-editor sudo apt install dconf-editor
  • Run it dconf-editor
  • Open com.canonical.unity.lenses
  • Add info-calculator.scope to the always-search list
  • Profit!

改完後就會像 screenshot 出現了...

在 Git/Mercurial/Subversion 上 "-" 發生的問題

在「[ANNOUNCE] Git v2.14.1, v2.13.5, and others」這邊看到 - 開頭產生的問題:

These contain a security fix for CVE-2017-1000117, and are released in coordination with Subversion and Mercurial that share a similar issue. CVE-2017-9800 and CVE-2017-1000116 are assigned to these systems, respectively, for issues similar to it that are now addressed in their part of this coordinated release.

這算是老問題了,Git 對應的修正主要是朝 filter input 的方向修正,包括了禁用 - 開頭的 hostname,以及禁止 GIT_PROXY_COMMAND- 開頭,另外是禁止開頭是 - 的 repository name:

  • A "ssh://..." URL can result in a "ssh" command line with a hostname that begins with a dash "-", which would cause the "ssh" command to instead (mis)treat it as an option. This is now prevented by forbidding such a hostname (which should not impact any real-world usage).
  • Similarly, when GIT_PROXY_COMMAND is configured, the command is run with host and port that are parsed out from "ssh://..." URL; a poorly written GIT_PROXY_COMMAND could be tricked into treating a string that begins with a dash "-" as an option. This is now prevented by forbidding such a hostname and port number (again, which should not impact any real-world usage).
  • In the same spirit, a repository name that begins with a dash "-" is also forbidden now.

然後中華電信的 DNS server (168.95.1.1 & 168.95.192.1) 都查不到 marc.info,改用 Google 的 8.8.8.8 才查得到... =_=

Archives