Convert two missed phutil_utf8_shorten() callsites
Summary: Fixes T6006. These didn't get caught by D10392. Test Plan: Forced migration to re-run; ran SSH commands against Phabricator. Auditors: btrahan
This commit is contained in:
		| @@ -67,9 +67,14 @@ foreach ($map as $credential_type => $credential_usernames) { | ||||
|   foreach ($credential_usernames as $username => $credential_secrets) { | ||||
|     foreach ($credential_secrets as $secret_plaintext => $repositories) { | ||||
|       $callsigns = mpull($repositories, 'getCallsign'); | ||||
|  | ||||
|       $signs = implode(', ', $callsigns); | ||||
|  | ||||
|       $name = pht( | ||||
|         'Migrated Repository Credential (%s)', | ||||
|         phutil_utf8_shorten(implode(', ', $callsigns), 128)); | ||||
|         id(new PhutilUTF8StringTruncator()) | ||||
|           ->setMaximumGlyphs(128) | ||||
|           ->truncateString($signs)); | ||||
|  | ||||
|       echo "Creating: {$name}...\n"; | ||||
|  | ||||
|   | ||||
| @@ -82,12 +82,15 @@ try { | ||||
|         implode(', ', $workflow_names))); | ||||
|   } | ||||
|  | ||||
|   $log_argv = implode(' ', array_slice($original_argv, 1)); | ||||
|   $log_argv = id(new PhutilUTF8StringTruncator()) | ||||
|     ->setMaximumCodepoints(128) | ||||
|     ->truncateString($log_argv); | ||||
|  | ||||
|   $ssh_log->setData( | ||||
|     array( | ||||
|       'C' => $original_argv[0], | ||||
|       'U' => phutil_utf8_shorten( | ||||
|         implode(' ', array_slice($original_argv, 1)), | ||||
|         128), | ||||
|       'U' => $log_argv, | ||||
|     )); | ||||
|  | ||||
|   $command = head($original_argv); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley