cancel
Showing results for 
Search instead for 
Did you mean: 
satbir
Level 7

Control content in POST command

Jump to solution

Hi,

I have a requirement where users should post data only to specific users for which i need to check the content within the HTTP Post.

Firebug output:

POST

Parameters:      application/x-www-form-urlencoded

authenticity_token5354f0ba1bfb4f5e469906538d994f49dceb5ed1
in_reply_to_status_id309208394538053632
place_id
status@ABC testing. pls ignore

Source

authenticity_token=5354f0ba1bfb4f5e469906538d994f49dceb5ed1&in_reply_to_status_id=309208394538053632&place_id=&status=%40ABC+testing.+pls+ignore

In the above i can check which request contains post data using "command.name = post" and find out the parameters that exist in it using "command.parameters = status".

Can we go a level deeper and check if the status parameter contains @ABC withiin the request?

Regards,

Satbir

0 Kudos
1 Solution

Accepted Solutions
alexott
Level 11

Re: Control content in POST command

Jump to solution

You can use regular expression against Body.Text property, especially if you combine it with Body.MimeTypeEnsured == "application/x-www-url-encoded"

0 Kudos
4 Replies
McAfee Employee

Re: Control content in POST command

Jump to solution

I havent tested this, but I think URL.GetParameter("status") matches "*abc* would work. If it doesnt it may only apply to GET parameters rather than POST parameters.

Best,

Jon

0 Kudos
satbir
Level 7

Re: Control content in POST command

Jump to solution

Actually, the POST doesn't show in URL. I am trying to achieve controls on twitter and @ABC (i used as example eariler) is a twitter handle. It uses Javascript to create tweets. Requirement is users should tweet only to their organisation page of twittertwitter post.png

0 Kudos
alexott
Level 11

Re: Control content in POST command

Jump to solution

You can use regular expression against Body.Text property, especially if you combine it with Body.MimeTypeEnsured == "application/x-www-url-encoded"

0 Kudos
satbir
Level 7

Re: Control content in POST command

Jump to solution

It worked! Thanks!

I made the rule little more specific by adding URL property along with ensured media type and body.text.

Regards,

Satbir

0 Kudos