There is a bug that allows normal users to post on others twitter account using : Announce this post on Twitter and selecting any registered account, no settings or permission to disallow this!
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | twitter-n1970498-26-7.x-6.x.patch | 617 bytes | damienmckenna |
| #27 | twitter-n1970498-27-6.x-5.x.patch | 622 bytes | damienmckenna |
| #26 | twitter-n1970498-26-7.x-6.x.patch | 617 bytes | damienmckenna |
| #25 | twitter-n1970498-25-7.x-5.x.patch | 572 bytes | damienmckenna |
| #20 | twitter-n1970498-20-6.x-5.x.patch | 3.28 KB | damienmckenna |
Comments
Comment #1
manuel.adanQuick patch attached solves it in form, but should be reviewed the submit (nodeapi) code also to protect from malicious POSTs from anyone who knows account_id of other users.
Comment #2
korzh-nick commentedHI.
in 7.x-5.8 has the same problem, there is a solution?
Comment #3
dgeo commentedthis definitely deserves some work…
Comment #4
naheemsays commentedThis is definitely a big issue if twitter post can post form any twitter account authenticated to the website.
There used to be a concept of a global/sitewide twitter account at some time which has since been removed.
Ideally the sitewide account should also be useable along with the own account, but definitely no other accounts.
Comment #5
nielsonm commentedRe-rolled patch against latest dev.
Comment #6
nielsonm commentedOops wrong variable. Re-rolling.
Comment #7
nielsonm commentedCreated a similar patch for the 6.x branch. This adds a global account field to the admin settings form so that given Twitter accounts are available globally.
Comment #9
damienmckennaRerolled.
Comment #10
damienmckennaCould someone please test this - it adds protection via hook_node_insert().
Comment #11
damienmckennaThis also checks if the account is global.
Comment #12
damienmckennaComment #13
damienmckennaBackported to 6.x-5.x.
Comment #14
damienmckennaRerolled for 7.x-6.x. I'm not sure if this is correct - the field-based structure works differently to the structure from 7.x-5.x and it may need some adjusting. In particular, the field stores the twitter account's Drupal uid whereas the old method stores the actual Twitter ID.
Comment #15
damienmckennaComment #16
damienmckennaTrying that last patch again.
Comment #17
damienmckennaIt turns out that this depends upon a feature that isn't actually exposed through the UI, so it's going to have to absorb #1935956: How to add a global account in 7.x-5.5?.
Back to the 7.x-5.x branch while I work this out.
Comment #18
damienmckennaUpdated to also show the 'is_global' option on the twitter accounts list.
Comment #19
damienmckennaUpdated patch for the 7.x-6.x branch.
Comment #20
damienmckennaUpdated patch for the 6.x-5.x branch.
Comment #22
damienmckennaCommitted.
Comment #24
damienmckennaWhoops, had some incorrect logic in twitter_post_node_insert().
Comment #25
damienmckennaOk, corrected^2.
Comment #26
damienmckennaThe fix ported to the 7.x-6.x branch.
Comment #27
damienmckennaThe fix ported to 6.x-5.x.
Comment #30
damienmckennaComment #31
damienmckennaGah, trying to get the 7.x-6.x patch to apply correctly.
Comment #33
damienmckennaNot sure what it's problem is, it applies fine locally.
Committed.