in the textbox when we pass the text within "< " bracket then it shows the error like
A potentially dangerous Request.Form value was detected from the client (grouplink$txtAddPerson="
Blind SQL Injection
Severity: High
Test Type: Application
Vulnerable URL:
Remediation Tasks: Filter out hazardous characters from user input
Variant 1 of 2 [ID=12654]
The following changes were applied to the original request:
• Set parameter 'nm's value to 'Demography'%20and%20'foobar'='foobar'
In rails 2 you can use the :any option to define a custom route that responds to any request method e.g.
map.resources :items, :member => {:erase => :any}
rails 3 doesn't seem to support the :any option
resources :items do
get :erase, :on => :member # works
any :erase, :on => :member # doesn't work
end
does anyone know if this option has been removed or just renamed?
I keep getting an error:
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code The thread '' (0x27ee4) has exited with code 0 (0x0).
I was told it was related to this:
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("Results.aspx?Keywords=" + searchString.Text);
}
I figured it may help to include my complete code. The code above is the only C# code on my first asp page.
That code relates to this code on this page. It is also the only C# code I have on my second page. I am simply just trying to pass a keyword from a search form to this block of code:
if (Request.QueryString["Keywords"] != null){
string keywords = Request.QueryString["Keywords"];
string myAppID = "HIDDEN";
var xml = XDocument.Load("http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=" + myAppID + "&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=" + keywords + "&paginationInput.entriesPerPage=5");
XNamespace ns = "http://www.ebay.com/marketplace/search/v1/services";
var titles = from item in xml.Root.Descendants(ns + "title")
select new{
title = xml.Descendants(ns + "title").Select (x => x.Value),
};
foreach (var item in titles){
Label1.Text += item;
}
}
This block of code calls the keyword value and uses it in an api to perform a search. The code of the xml(api) formats like this:
<findItemsByKeywordsResponse xmlns="http://www.ebay.com/marketplace/search/v1/services">
<searchReslut count="5">
<item>
<title></title>
</item>
<item>
<title></title>
</item>
<item>
<title></title>
</item>
Why am I getting this error how do you fix it?
i refactored my entire application and gave it a whole new design. The one thing that seems to be broken is all the original link_to methods I had which were :method = :delete are now getting sent as a GET request.
The only thing I did that I can remember that might cause it is delete jquery-rails from the gemfile (I'm just getting it from google ajax).
Does anyone have any other ideas what I could have deleted?
This might seem like an odd request but I'd like to use jQuery's Selectable tool to only select one item at a time and I'd like it to show me a value I'll have within each tag. At the very least I want the contents of that selection. Has anyone tried to do this? For some reason these little things seem to not be all that easily findable in their API for it.
Hi
I have a class DataObject as
Header :::
#import <Foundation/Foundation.h>
@interface DataObject : NSObject {
NSString *erorrMessage;
BOOL hasError;
NSDictionary *dataValues;
}
@property(nonatomic, retain)NSString *erorrMessage;
@property(nonatomic)BOOL hasError;
@property(nonatomic, retain)NSDictionary *dataValues;
@end
Class Implementation::::
#import "DataObject.h"
@implementation DataObject
@synthesize erorrMessage;
@synthesize hasError;
@synthesize dataValues;
@end
And I have another class as DataManager
Header as ::::
#import <Foundation/Foundation.h>
@interface DataManager : NSObject
- (DataObject *)getData :(NSString*)url;
@end
Implementation ::::
#import "DataManager.h"
#import "DataObject.h"
#import "JSON.h"
@implementation DataManager
- (DataObject *)getData :(NSString*)url{
DataObject* dataObject = [[DataObject alloc]init];
NSString *urlString = [NSString stringWithFormat:url];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
//TODO: Here we have to check the internet connection before requesting.
NSError * erorrOnRequesting;
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:&erorrOnRequesting];
NSString* responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
if( erorrOnRequesting != nil)
{
dataObject.hasError = YES;
dataObject.erorrMessage = @"Error on requsting to the web server";
return dataObject;
}
NSError *errorOnParsing;
SBJSON *json = [[SBJSON new] autorelease];
NSDictionary *dataValues = [json objectWithString:responseString error:&errorOnParsing];
[responseString release];
if(errorOnParsing != nil)
{
//TODO: We have to send the website a feedback that there is some problem on the server end.
dataObject.hasError = YES;
dataObject.erorrMessage = @"Error on parsing, the server returned invalid data.";
return dataObject;
}
dataObject.hasError = NO;
dataObject.dataValues = dataValues;
return dataObject;
}
@end
Now when I build I got an error in the DataManager header where I #import Dataobject header, it says "error: expected')' before DataObject"
I don;t understand what I miss.
Thanks for the help..
I'm troubleshooting a java app where XML is sent between two systems using HTTP POST and a servlet. I suspect that the problem is that the XML is growing way to big. Is it possible that this is the problem? Is there a limit?
When it doesn't work, the request.getParameter("message") on the consumer side will return null.
Both apps are running on tomcat
I am injecting HttpContextBase into a caching class. HttpContextBase is registered as PerWebRequest. I interact with the caching class on each web request and this works fine, but I also need to initialise the cache at application start.
I understand that PerWebRequest does not work in Application_Start though:
http://stackoverflow.com/questions/2670717/castle-perrequestlifestyle-not-recognize
What is the best way to resolve this in my situation?
I'm trying to locate the "throbber" (or "spinner") image used in the Firefox 3.6x chrome to show that a request is being processed:
I'm not familiar with the source code structure for Firefox, and a simple search hasn't yielded the answer.
Does anyone know which file I'm looking for? (E.g. can you provide a link to the file in the Mercurial repository, or tell me how to find it?).
To reduce http request i want to mix multiple jquery plugin's javascript filesa and main jquery file into one.
What things should be considered?
Do we just need to place code from all files into new file one bye one or need to do something more. ?
Hi,
I have a webservice, in which I read the settings saved in an xml file.
I read the setting by the following command:
string dpath = HttpContext.Current.Request.PhysicalApplicationPath.ToString();
XmlTextReader reader = new XmlTextReader(dpath + "Settings.xml");
This is working perfectly when running the application on the localhost, but when I publish the webserver I am getting an error, most probably because the settings are not being loaded.
Am I using the right command to read the file ?
thanks
I'm making board game and i'm using jquery ui draggable effect for figures. On drag start I send ajax request to other page where I generate droppable places soo the figure can be drag and droped only on those particular places, but the problem is I must move figure twice to take effect. Does anyone know how to solve this problem?
I would be very grateful for help.
If I have a look at my cookievalue .ASPXANONYMOUS it is a string ie
WZnX-rXHygEkAAAAOTFhZjE5YTctZmEzZi00MTMwLWEwNTAtYjYwMzI0N2M0NTY4gQUsRlThiJWAjBgmBnpeIba7eGo1
The value Request.AnonymousID is a Guid.
How do you get from ASPXANONYMOUS to AnonymousID ?
I need this to debug some issues I have with FormsAuthentication.
I have a page that performs an Ajax request that replaces a div every second.
This div also has hyperlinks in it.
If the user tries to click one of the hyperlinks, it will work, but if they move the cursor over the link, wait for a second without moving the cursor, the hyperlink no longer has the "hover" pseudostyle and if they click at the wrong time, the link doesn't work.
Is there a way to update the div without causing this, or to restore the "mouse over" state of the link?
Is there a way to PHP make asynchronous http calls? I don't care about the response, I just want to do something like file_get_contents(), but not wait on the request to finish before executing the rest of my code. This would be super useful for setting off "events" of a sort in my application, or triggering long processes.
Any ideas?
I've got a mysql query like this:
SELECT A.ID, A.NAME, B.ID, B.NAME
FROM table1 A
JOIN table2 B ON ( A.ID = B.TABLE1_ID )
WHERE
cond1, cond2, ..., condN
LIMIT 10
I've got many where clauses in query.
How to improve this query to get also full row count?
I don't want to use one more request without LIMIT.
I am developing a jQtouch app and each request done via ajax creates a new div in the document for the loaded content. Only a single div is shown at any one time.
How many div's can I have before the app starts getting unresponsive and slow?
Anyone have any ideas on this?
This might sound like a trivial problem but for some reason it is not.
Instead of needing to redirect
Response.Redirect("~/folder1/folder2/some.aspx")
I need the location as if it behaved like
string navigatingUrl = Response.Redirect("~/folder1/folder2/some.aspx")
Trying to replicate this I started with
string navigatingUrl = new Uri(HttpContext.Current.Request.Url,
new Uri("~/folder1/folder2/some.aspx", UriKind.Relative));
This instead generates "http://www.fullRequestUrl/~/folder1/folder2/some.aspx"
I'm using enterprise library for logging web page events. Because page is load balanced I have to store logs in database on different server (requirement). Sadly, I found storing around 20 entries per page request is very slow (adds additional ~10s). Can anybody explain why this happens and how to fix it.
P.S. I'm using default pooling settings in logging database connection string.
Hi,
I seem to not be able to find implementation from the common Ajax libraries (JQuery, mootools, prototypejs...) that would allow the operation of parsing the window.location.href for request parameter. I would expect something like:
$P{"param1"} == "param1_value"
Am I missing something?
p.s. The web does contains implementation examples for such operations
I'm working on a Facebook app, and I'm trying to get a friends list similar to Farmville 2.
They have a "friends who like games" list. My first thought is, I can get a list of all friends, then for each friend, see if they like any pages with type == "GAMES/TOYS". But ideally, I would like to get the list in one query (not by making one graph API or FQL request per friend).
Is this possible, and if so, how?
After reading command design pattern, I have a couple of question -
Why we are creating concrete command and receiver object on client. Can't this initialization on invoker class?
I think client should create invoker and pass it's request to invoker. Invoker should take care of all the stuff.
By doing this,
We have less dependency on client.
The design of class diagram is totally different from actual design.
I'd like it so when I check out a file no one else can edit it until I check it back in. Is there a version control system that allows me to do this? I currently use Subversion and I know it has the 'lock' feature but I want it to do that automatically without me having to request it on each file I'm working on.
I receive POST request at my PHP script and would like to forward this post call to another script using POST too. How to do this? I can use cURL if it's required for this action.