Community

To:
Subject:
Message:
or Cancel

I need wordpress auto post code

jim9
Apr 20, 2012 (2 years 4 days ago)

Hi,

Is there a free plugin or piece of code that I can add to my wordpress website to enable auto post?

Thanks in advance

  • Thankful People:

I need wordpress auto post code

Felps
May 01, 2012 (1 year 358 days ago)

United States US

I'm working on one, it's not quite ready for release yet. It works by adding the games to a queue and then you'll have to go to your admin page to approve the queued games, I do this for security reasons, I still haven't written the interface so you can post games from your queue, and also I'm having some trouble receiving the game tag from mochi, but if I hand-feed the script a valid game tag, the game is correctly added to the queue.

I need wordpress auto post code

Felps
May 02, 2012 (1 year 357 days ago)

United States US

Just an update, the game tag is now being received properly, wordpress didn't make it easy :P. But it isn't very secure, just anyone could add a game to your queue if they knew you were using the plugin and used a valid game tag. Admittedly not a very large concern since you could just delete the game from your queue, and I'm planning future releases adding suggested games to your queue based on the tags of games you have... But that's still not very desirable, I'm going to see if I can figure out where the request comes from, and validate that it was in fact mochi that sent it.

If it ends up being a local script (IE: the request comes from YOU, I'll just check to see if your session ID is correct)

  • Thankful People:

I need wordpress auto post code

Felps
May 09, 2012 (1 year 350 days ago)

United States US

There's a basic version of the plugin now available. ALL it does right now is add the ability to use auto-post to your blog. http://www.bionicsquirrels.com/mochi-arcade-auto-post/ the download link is at the bottom.

  • Thankful People:

I need wordpress auto post code

nmz502
May 09, 2012 (1 year 350 days ago)

United States US

It's not a very good idea to have no security in your plugin. Someone could inject bad code into your site.

A security method you could use is a unique "password" added as a GET to your URL

(your_url.php?code=ruio49809fjrhcvb).

  • Thankful People:

I need wordpress auto post code

Felps
May 09, 2012 (1 year 350 days ago)

United States US

The game tag is sql escaped, the worst they could do is put random games into the game queue.

  • Thankful People:

I need wordpress auto post code

Felps
May 09, 2012 (1 year 350 days ago) edited 1 year 350 days ago

United States US

$wpdb->prepare('sql query %s', $game_tag) does the escaping.

I also did try the .php?password=somethingSetInPluginOptions method you describe, the password, even when correct was never sent by mochi, although the game_tag still was. It requires some debugging.

There's also a layer of separation that requires a valid NONCE key and admin referrer to actually POST a game to the site, it'd be very difficult to use that vulnerability to produce a visible effect on the site in question. Though my GF might like that dressup game :P

Even lag would be tough, spamming invalid game_tags would result in the site requesting the tag from Mochi, and then Mochi sending back NULL, the php code checking for NULL -> exit();

Spamming multiple of the same, valid game_tag results in a single query to the DB to check if that game is already there, if it is -> exit();

The only way to do it is to spam VALID, DIFFERENT game_tags, in which case you'll be able to put every mochi game into the queue, and then nothing else. Still won't post anything. Anti-spam protection is also planned for the next update... If I find that the request, coming from a hostgator server (gator697.hostgator.com if I remember right) never changes, I might just check that the request is coming from there, if not, I'll work with Mochi to figure something out.

Hmm, now the password IS getting sent, maybe I had a typo before... Well, there'll be a version 1.0.2 in a little bit. :P

Another theory as to why it didn't work before that doesn't involve a failure on my part... Maybe mochi strips off get vars called password before they send requests to anonymous websites... Since I called the key maappw this time, it works... (Mochi Arcade Auto Post PassWord), or maybe I just made a typo in one of the three places I have to type this in my code to get it to work. (raw page, to pass it along, wordpress init so wordpress doesn't strip it, and the function that adds a game to the queue)

  • Thankful People:

I need wordpress auto post code

Felps
May 09, 2012 (1 year 350 days ago)

United States US

Triple post, but this is relevant enough for a new one... V 1.0.4 is now up, it has a password function to prevent anonymous users adding games to the queue, and I made the settings screen more user friendly (including adding the url to copy-paste into mochi publisher settings.

  • Thankful People:

I need wordpress auto post code

nmz502
May 09, 2012 (1 year 350 days ago)

United States US

The other problem w/ no security is someone could ping the entire catalog to your site, thus taking down your server.

But you've added a level of security - good luck :)!

  • Thankful People:

I need wordpress auto post code

Felps
May 10, 2012 (1 year 349 days ago)

United States US

Really I made it for me, but I'm releasing it for anyone to use, I have a lot of improvements planned, not just that, the version I'm working on has a few bug fixes, and an option to keep games from appearing on your home page already. Bloggers who also post flash games are probably a tiny minority of a cross section of the population though, so I don't expect huge numbers.

  • Thankful People:
Back To The Forums