@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make the Conduit auth error for an unrecognized public key a little more useful

Summary: Ref T13168. This is just a small quality-of-life fix: we can disclose which public key we're talking about because public keys are public.

Test Plan:
- Hit public key error (through my own bumbling / not reading or following instructions). Specifically, I haven't associated the key with a device in Almanac.
- Before: vague error.
- After: more specific error with enough key material that I could grep for it.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: yelirekim

Maniphest Tasks: T13168

Differential Revision: https://secure.phabricator.com/D19516

+6 -1
+6 -1
src/applications/conduit/controller/PhabricatorConduitAPIController.php
··· 211 211 ->withIsActive(true) 212 212 ->executeOne(); 213 213 if (!$stored_key) { 214 + $key_summary = id(new PhutilUTF8StringTruncator()) 215 + ->setMaximumBytes(64) 216 + ->truncateString($raw_key); 214 217 return array( 215 218 'ERR-INVALID-AUTH', 216 - pht('No user or device is associated with that public key.'), 219 + pht( 220 + 'No user or device is associated with the public key "%s".', 221 + $key_summary), 217 222 ); 218 223 } 219 224