Home » Posts tagged "subversion"

DefaultCcPlugin 改 Component 不會增加 Cc 列表的問題...

TracDefaultCcPlugin 裡有個很喜歡用的 feature:改 component 後會自動增加該 component 的 cc list。但這在 Changeset 13747 被「修正」掉了:

0.3dev: Only append to CC field when ticket is created. Fixes #11624.
Previously the CC field would be modified on Preview and during any ticket change, however these would often go undetected since the field is de-duplicated on save.

而這個 plugin 還是用 Subversion 管理,本來找了一堆 svn2git 的工具,後來發現 Git 所以靠 git-svn 拉下來再改,然後再丟出來:「gslin/defaultccplugin」。

在 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 ( & 都查不到 marc.info,改用 Google 的 才查得到... =_=

Subversion 還原檔案的方式...

太久沒用 Subversion 了,為了用 redports.org 才又接觸...

Git 下改錯內容後可以用 git checkout -f filename 恢復,在 Subversion 下則是用 revert 恢復:

svn revert filename

svn help revert 可以看到完整的說明,包括恢復整個目錄的方式。