Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15407142
D21635.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21635.diff
View Options
diff --git a/scripts/ssh/ssh-exec.php b/scripts/ssh/ssh-exec.php
--- a/scripts/ssh/ssh-exec.php
+++ b/scripts/ssh/ssh-exec.php
@@ -146,6 +146,14 @@
$device_name));
}
+ if ($device->isDisabled()) {
+ throw new Exception(
+ pht(
+ 'This request has authenticated as a device ("%s"), but this '.
+ 'device is disabled.',
+ $device->getName()));
+ }
+
// We're authenticated as a device, but we're going to read the user out of
// the command below.
$is_cluster_request = true;
diff --git a/src/applications/conduit/controller/PhabricatorConduitAPIController.php b/src/applications/conduit/controller/PhabricatorConduitAPIController.php
--- a/src/applications/conduit/controller/PhabricatorConduitAPIController.php
+++ b/src/applications/conduit/controller/PhabricatorConduitAPIController.php
@@ -238,6 +238,16 @@
if ($object instanceof PhabricatorUser) {
$user = $object;
} else {
+ if ($object->isDisabled()) {
+ return array(
+ 'ERR-INVALID-AUTH',
+ pht(
+ 'The key which signed this request is associated with a '.
+ 'disabled device ("%s").',
+ $object->getName()),
+ );
+ }
+
if (!$stored_key->getIsTrusted()) {
return array(
'ERR-INVALID-AUTH',
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 4:04 PM (5 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7388175
Default Alt Text
D21635.diff (1 KB)
Attached To
Mode
D21635: Forbid disabled devices from authenticating via SSH or HTTP
Attached
Detach File
Event Timeline
Log In to Comment