Comments

manuel.adan’s picture

Status: Active » Needs work
StatusFileSize
new1.05 KB

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

korzh-nick’s picture

HI.
in 7.x-5.8 has the same problem, there is a solution?

dgeo’s picture

Version: 6.x-5.0 » 7.x-5.x-dev
Issue summary: View changes

this definitely deserves some work…

naheemsays’s picture

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

nielsonm’s picture

Re-rolled patch against latest dev.

nielsonm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.49 KB

Oops wrong variable. Re-rolling.

nielsonm’s picture

StatusFileSize
new2.72 KB

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

Status: Needs review » Needs work

The last submitted patch, 7: permission_to_post_on-1970498-7.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new1.14 KB

Rerolled.

damienmckenna’s picture

StatusFileSize
new1.87 KB

Could someone please test this - it adds protection via hook_node_insert().

damienmckenna’s picture

StatusFileSize
new1.99 KB

This also checks if the account is global.

damienmckenna’s picture

Version: 7.x-5.x-dev » 6.x-5.x-dev
StatusFileSize
new2.06 KB

Backported to 6.x-5.x.

damienmckenna’s picture

StatusFileSize
new2.32 KB

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

damienmckenna’s picture

Version: 6.x-5.x-dev » 7.x-6.x-dev
damienmckenna’s picture

StatusFileSize
new2.32 KB

Trying that last patch again.

damienmckenna’s picture

Version: 7.x-6.x-dev » 7.x-5.x-dev

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

damienmckenna’s picture

StatusFileSize
new4.21 KB

Updated to also show the 'is_global' option on the twitter accounts list.

damienmckenna’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
StatusFileSize
new3.55 KB

Updated patch for the 7.x-6.x branch.

damienmckenna’s picture

Version: 7.x-6.x-dev » 6.x-5.x-dev
StatusFileSize
new3.28 KB

Updated patch for the 6.x-5.x branch.

  • DamienMcKenna committed 53af2f9 on 6.x-5.x
    Issue #1970498 by nielsonm, arcovia, DamienMcKenna: Only allow users to...
damienmckenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 024c218 on 7.x-5.x
    Issue #1970498 by nielsonm, arcovia, DamienMcKenna: Only allow users to...
damienmckenna’s picture

Version: 6.x-5.x-dev » 7.x-5.x-dev
Status: Fixed » Needs review
StatusFileSize
new572 bytes

Whoops, had some incorrect logic in twitter_post_node_insert().

damienmckenna’s picture

StatusFileSize
new572 bytes

Ok, corrected^2.

damienmckenna’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
StatusFileSize
new617 bytes

The fix ported to the 7.x-6.x branch.

damienmckenna’s picture

Version: 7.x-6.x-dev » 6.x-5.x-dev
StatusFileSize
new622 bytes

The fix ported to 6.x-5.x.

The last submitted patch, 26: twitter-n1970498-26-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Version: 6.x-5.x-dev » 7.x-6.x-dev
damienmckenna’s picture

StatusFileSize
new617 bytes

Gah, trying to get the 7.x-6.x patch to apply correctly.

Status: Needs review » Needs work

The last submitted patch, 31: twitter-n1970498-26-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Fixed

Not sure what it's problem is, it applies fine locally.

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.