Page MenuHomePhorge

D25121.1734958831.diff
No OneTemporary

D25121.1734958831.diff

diff --git a/scripts/repository/commit_hook.php b/scripts/repository/commit_hook.php
--- a/scripts/repository/commit_hook.php
+++ b/scripts/repository/commit_hook.php
@@ -119,7 +119,7 @@
exit($err);
} else if ($repository->isGit() || $repository->isHg()) {
$username = getenv(DiffusionCommitHookEngine::ENV_USER);
- if (!phutil_nonempty_string($username)) {
+ if ($username !== false && !phutil_nonempty_string($username)) {
throw new Exception(
pht(
'No Direct Pushes: You are pushing directly to a hosted repository. '.
@@ -181,17 +181,17 @@
$engine->setOriginalArgv(array_slice($argv, 2));
$remote_address = getenv(DiffusionCommitHookEngine::ENV_REMOTE_ADDRESS);
-if (phutil_nonempty_string($remote_address)) {
+if ($remote_address !== false && phutil_nonempty_string($remote_address)) {
$engine->setRemoteAddress($remote_address);
}
$remote_protocol = getenv(DiffusionCommitHookEngine::ENV_REMOTE_PROTOCOL);
-if (phutil_nonempty_string($remote_protocol)) {
+if ($remote_protocol !== false && phutil_nonempty_string($remote_protocol)) {
$engine->setRemoteProtocol($remote_protocol);
}
$request_identifier = getenv(DiffusionCommitHookEngine::ENV_REQUEST);
-if (phutil_nonempty_string($request_identifier)) {
+if ($request_identifier !== false && phutil_nonempty_string($request_identifier)) {
$engine->setRequestIdentifier($request_identifier);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 13:00 (18 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1026980
Default Alt Text
D25121.1734958831.diff (1 KB)

Event Timeline