@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.

strncmp is better than strpos

Summary: no need to get all O(N) up in this when we can do constant time of "8"

Test Plan: arc lint

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Maniphest Tasks: T891

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

+1 -1
+1 -1
src/applications/auth/oauth/provider/PhabricatorOAuthProviderPhabricator.php
··· 105 105 106 106 public function setUserData($data) { 107 107 // legacy conditionally strip shield. see D3265 for discussion. 108 - if (strpos($data, 'for(;;);') === 0) { 108 + if (strncmp($data, 'for(;;);', 8) === 0) { 109 109 $data = substr($data, 8); 110 110 } 111 111 $data = idx(json_decode($data, true), 'result');