Commits


CHANGES for 0.125


prevent NULL pointer dereferences when empty tree objects are encountered Found by me while investigating the issues reported by Runxi Yu. The test added here would trigger a crash in tog using a modified version of Runxi Yu's bug reproduction script.


avoid checking out tree entry names "." and "..", and names containing "/" This would allow malicious repositories to perform arbitrary file overwrites with user permissions via crafted tree entry names. The regression test added here shows that such repositories can be trivially created with Git. On operating systems which lack unveil(2) any user-writable file could be created or changed. On OpenBSD, unveil(2) restricts arbitrary write access to the work tree itself and the /tmp directory. Problem reported me by Runxi Yu, along with a reproduction script I could use to write the regression test. Thanks!


reject attempts to put versioned files into .git, .got, or .cvg directories Versioned files inside the work tree's meta-data .got directory could be created during 'got checkout' or changed during 'got update'. Files in the meta-data directory should never be under version control, yet the implementation unfortunately allowed this. Which provides a way for malicious repositories to configure remote servers stored in .got/got.conf which would then be used by the fetch and send commands. Problem spotted by Runxi Yu and reported to me on IRC. testing + ok Thomas Adam


cleanup: fix redundant pack file removal when repository contains symlinks Add symlinks to the set of traversed object IDs during cleanup. Otherwise, packfiles which contain blobs that are symlinks will always be marked as containing unreferenced objects and 'gotadmin cleanup' will not remove them. This can result in an explosion of redundant packfiles if 'gotadmin cleanup' is run at regular intervals, and if the cleanup -a option is not used. I am unsure how to write a test case for this fix without making additional changes to the cleanup command. The tests run cleanup -a to bypass the mtime staleness safety check. This will never hit the problematic case fixed here. Reproducing the problem would require a test which waits for the (currently) hard-coded interval of 600 seconds before running cleanup. If we added a way to tweak the mtime threshold from tests then we could probably add a test case which covers this issue. Problem found because gothub.org backups were taking much more disk space than expected. ok runxi yu, op@


improve test coverage of send_merge_commit I am seeing cases where an automatic git mirroring sync job apparently fails to send all parents of a merge commit occasionally. My attempts to reproduce this in the test suite have failed so far. But anyway, this test should be checking whether all required commits have reached the destination repository, so let's expand test coverage accordingly.


bump version number


CHANGES for 0.124


sync dist file list


prevent spurious test failure due to wrong commit timestamp being checked


make gotwebd display logged-in usernames in case of group-membership auth In cases where the access identifier is a group name, gotwebd would display a group name rather than the name of the authenticated user in the "Logged in as" banner. We always want to display the user name. review/ok runxiyu


reject non-UTF-8-encoded reference names in gotsys.conf The docs already stated that reference names must be UTF-8.


document that site owner and repository description may use UTF-8


add a test case for UTF-8 repository owner names in gotsys.conf test and review/ok Kyle Ackerman


allow UTF-8 in gotsys string values test and review/ok Kyle Ackerman


validate UTF-8 in quoted strings in gotsys.conf test and review/ok Kyle Ackerman


rename decode() to utf8d_decode() for namespacing reasons


move utf8d.h to lib/


Plug a memory leak in libexec got-read-commit When got-read-commit receives an imsg of type GOT_IMSG_STOP, it attempts to exit the main loop and leaks the last imsg. This commmit frees the the imsg before breaking from the main loop. ok stsp@


typo fix


prevent non-root users from blocking gotctl reload requests Patch by: Henry Ford The bug fixed here is as follows, in Henry's words: If a GOTD_IMSG_RELOAD message is sent by a non root user, then gotd(8) will deny the request. However, gotd(8) will accept a GOTD_IMSG_RELOAD_SECRETS message from any client regardless of their uid. After receiving a GOTD_IMSG_RELOAD_SECRETS message gotd(8) will not accept another such message until it receives a GOTD_IMSG_RELOAD message to complete the reload request. Thus, a non root user can block any future gotctl(8) reload requests from succeeding by sending a GOTD_IMSG_RELOAD_SECRETS message to gotd(8). You can reproduce this by running the following commands with gotd(8) running: $ gotctl reload -c /dev/null gotctl: reload: Operation not permitted # gotctl reload gotctl: received unexpected privsep message


expand tab characters in log messages displayed by tog diff Ever since tog started indenting the log message by one space character, lines containing tab characters ended up using wrong indentation. Fix this by expanding tabs to spaces before applying extra indentation. To see the effect of this fix, start tog in diff.git as follows: tog diff -c dc306c6bd88271ab911e205539974da98be82d17


add a todo item for gotsysd


remove a gotwebd TODO item which is done


remove a todo item for 'got fetch' which has been done for a long time