1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 02:12:41 +01:00
phorge-phorge/src/applications
epriestley 8915fd8be8 Don't try to generate a CSRF token for the omnipotent user
Summary:
We can end up here with a stack trace like this, while rendering an embedded Slowvote trying to publish a Feed story:

```
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000] [2015-06-08 22:49:57] EXCEPTION: (PhutilProxyException) Error while executing Task ID 830591. {>} (PhabricatorDataNotAttachedException) Attempting to access attached data on PhabricatorUser (via getAlternateCSRFString()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000] Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:166]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000] arcanist(head=master, ref.master=7d15b85a1bc0), phabricator(head=master, ref.master=929f5f22acef), phutil(head=master, ref.master=92882eb9404d)
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #0 <#2> PhabricatorLiskDAO::assertAttached(string) called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:556]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #1 <#2> PhabricatorUser::getAlternateCSRFString() called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:432]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #2 <#2> PhabricatorUser::generateToken(integer, integer, string, integer) called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:344]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #3 <#2> PhabricatorUser::getRawCSRFToken() called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:357]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #4 <#2> PhabricatorUser::getCSRFToken() called at [<phabricator>/src/infrastructure/javelin/markup.php:91]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #5 <#2> phabricator_form(PhabricatorUser, array, array) called at [<phabricator>/src/applications/slowvote/view/SlowvoteEmbedView.php:169]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #6 <#2> SlowvoteEmbedView::render() called at [<phabricator>/src/view/AphrontView.php:175]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #7 <#2> AphrontView::producePhutilSafeHTML() called at [<phutil>/src/markup/render.php:133]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #8 <#2> phutil_escape_html(SlowvoteEmbedView)
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #9 <#2> array_map(string, array) called at [<phutil>/src/markup/engine/remarkup/PhutilRemarkupBlockStorage.php:56]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #10 <#2> PhutilRemarkupBlockStorage::restore(PhutilSafeHTML, integer) called at [<phutil>/src/markup/engine/PhutilRemarkupEngine.php:299]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #11 <#2> PhutilRemarkupEngine::restoreText(PhutilSafeHTML, integer) called at [<phutil>/src/markup/engine/PhutilRemarkupEngine.php:295]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #12 <#2> PhutilRemarkupEngine::postprocessText(array) called at [<phabricator>/src/infrastructure/markup/PhabricatorMarkupEngine.php:138]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #13 <#2> PhabricatorMarkupEngine::process() called at [<phabricator>/src/applications/feed/story/PhabricatorFeedStory.php:167]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #14 <#2> PhabricatorFeedStory::loadAllFromRows(array, PhabricatorUser) called at [<phabricator>/src/applications/feed/query/PhabricatorFeedQuery.php:37]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #15 <#2> PhabricatorFeedQuery::willFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:237]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #16 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:168]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #17 <#2> PhabricatorPolicyAwareQuery::executeOne() called at [<phabricator>/src/applications/feed/worker/FeedPushWorker.php:12]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #18 <#2> FeedPushWorker::loadFeedStory() called at [<phabricator>/src/applications/feed/worker/FeedPublisherWorker.php:6]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #19 <#2> FeedPublisherWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:91]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #20 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:162]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #21 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #22 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:185]
Daemon 43450 STDE [Mon, 08 Jun 2015 22:49:57 +0000]   #23 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:125]
```

Just return `null`.

Test Plan: Will check that tasks clear in production.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13218
2015-06-08 16:07:21 -07:00
..
almanac Fix method visibilities 2015-06-09 07:17:44 +10:00
aphlict Linter fixes 2015-06-02 22:14:01 +10:00
arcanist/conduit Mark "arcanist.projectinfo" as deprecated 2015-05-25 22:52:41 +10:00
audit Use standard subscribers effects in Herald Adapter for commits 2015-06-08 10:31:38 -07:00
auth Add "Mailing List" users 2015-06-03 18:42:33 -07:00
base Send mail to targets in the user's translation 2015-06-03 18:59:33 -07:00
cache Introduce a request cache mechanism 2015-06-04 17:27:31 -07:00
calendar Check if recurrence end date is disabled before saving it. 2015-06-08 11:58:45 -07:00
celerity Digest resource cachekeys to maximum length 2015-06-01 09:04:22 -07:00
chatlog phtize all the things 2015-05-22 21:16:39 +10:00
conduit Add "Mailing List" users 2015-06-03 18:42:33 -07:00
config Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
conpherence Remove *TransactionType classes 2015-06-08 11:26:43 +10:00
console Make everything 1000x or 1000000x slower 2015-05-23 05:36:02 -07:00
countdown phtize all the things 2015-05-22 21:16:39 +10:00
daemon Linter fixes 2015-06-02 22:14:01 +10:00
dashboard phtize all the things 2015-05-22 21:16:39 +10:00
differential Fix an issue with adding or updating images in unified diff view 2015-06-08 15:40:10 -07:00
diffusion Make ACTION_NOTHING a "standard" action in Herald 2015-06-08 10:30:09 -07:00
diviner Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
doorkeeper Rename some remarkup classes 2015-06-08 11:27:20 +10:00
draft/storage Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
drydock Linter fixes 2015-06-02 22:14:01 +10:00
fact Introduce a request cache mechanism 2015-06-04 17:27:31 -07:00
feed phtize all the things 2015-05-22 21:16:39 +10:00
files Don't load attached files for profile images 2015-06-08 15:39:47 -07:00
flag phtize all the things 2015-05-22 21:16:39 +10:00
fund phtize all the things 2015-05-22 21:16:39 +10:00
harbormaster Fix method visibilities 2015-06-09 07:17:44 +10:00
help Use __CLASS__ instead of hard-coding class names 2015-05-14 07:21:13 +10:00
herald Use standard subscribers effects in Herald Adapter for revisions 2015-06-08 10:32:08 -07:00
home phtize all the things 2015-05-22 21:16:39 +10:00
legalpad Remove *TransactionType classes 2015-06-08 11:26:43 +10:00
lipsum phtize all the things 2015-05-22 21:16:39 +10:00
macro Fix method visibilities 2015-06-09 07:17:44 +10:00
mailinglists/storage Put PhabricatorMetaMTAMailingList back to keep bin/storage adjust happy for now 2015-06-03 18:51:40 -07:00
maniphest Drive Maniphest grouping and ordering through standard infrastructure 2015-06-08 12:23:13 -07:00
meta phtize all the things 2015-05-22 21:16:39 +10:00
metamta Apply Herald subscription effects immediately 2015-06-08 10:50:13 -07:00
multimeter Use PhutilInvalidStateException 2015-05-14 07:53:52 +10:00
notification Add an index to the story notification table 2015-06-08 11:28:49 +10:00
nuance Give Nuance form sources a web UI 2015-06-05 11:01:06 -07:00
oauthserver Linter fixes 2015-06-02 22:14:01 +10:00
owners Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
passphrase Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
paste Support ordering in SearchField 2015-06-08 12:21:48 -07:00
people Don't try to generate a CSRF token for the omnipotent user 2015-06-08 16:07:21 -07:00
phame Make PhameBlog implement PhabricatorApplicationTransactionInterface 2015-06-03 18:59:42 -07:00
phid Remove mailing lists application 2015-06-03 18:42:36 -07:00
phlux Transactions - make implementing TYPE_XXXX_POLICY transactions optional 2015-05-19 12:58:18 -07:00
pholio Fix method visibilities 2015-06-09 07:17:44 +10:00
phortune Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
phpast phtize all the things 2015-05-22 21:16:39 +10:00
phragment phtize all the things 2015-05-22 21:16:39 +10:00
phrequent phtize all the things 2015-05-22 21:16:39 +10:00
phriction Use standard subscribers effects in Herald Adapter for Phriction 2015-06-08 10:31:09 -07:00
policy Provide core policy support for Spaces 2015-06-04 17:46:32 -07:00
ponder Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
project Fix method visibilities 2015-06-09 07:17:44 +10:00
releeph Linter fixes 2015-06-02 22:14:01 +10:00
remarkup/conduit phtize all the things 2015-05-22 21:16:39 +10:00
repository Fix method visibilities 2015-06-09 07:17:44 +10:00
search Drive Maniphest grouping and ordering through standard infrastructure 2015-06-08 12:23:13 -07:00
settings Allow administrators to configure "Email Settings" settings for lists 2015-06-03 18:42:41 -07:00
slowvote phtize all the things 2015-05-22 21:16:39 +10:00
spaces Fix some method visibilities 2015-06-08 09:52:14 +10:00
subscriptions phtize all the things 2015-05-22 21:16:39 +10:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Remove flags and tokens upon object destruction 2015-06-04 07:23:48 +10:00
tokens phtize all the things 2015-05-22 21:16:39 +10:00
transactions Stop "join project" from trying to write an inverse edge on Users 2015-06-08 14:45:22 -07:00
typeahead phtize all the things 2015-05-22 21:16:39 +10:00
uiexample phtize all the things 2015-05-22 21:16:39 +10:00
xhprof phtize all the things 2015-05-22 21:16:39 +10:00