Questions tagged [rawurl]

15 questions
8
votes
8 answers

ASP.NET: Get *real* raw URL

In ASP.NET, is there any way to get the real raw URL? For example, if a user browse to "http://example.com/mypage.aspx/%2F", I would like to be able to get "http://example.com/mypage.aspx/%2F" rather than "http://example.com/mypage.aspx//". I would…
Rasmus Faber
  • 48,631
  • 24
  • 141
  • 189
5
votes
1 answer

php url encode issue

I send out html email on user activation with token that I encode with rawurlencode(). So - link appears in email like this:
Stann
  • 13,518
  • 19
  • 65
  • 73
4
votes
2 answers

replace entites in rawurlencode i.e. < > "

I have the following code
Rob Oliver
  • 41
  • 1
  • 3
2
votes
2 answers

What are possible reasons for "Potentially dangerous Request.RawUrl"?

In an asp.net web forms application we get an error message with "A potentially dangerous Request.RawUrl" sometimes, but I cannot find the source of it. What are the possible reasons for this exception? Some details from our case: Event message: A…
Ole Lynge
  • 4,457
  • 8
  • 43
  • 57
1
vote
2 answers

result of php rawurlencode() different on different server

On a dedicated server: $_POST['kannada']='ಕನ್ನಡ'; rawurlencode($_POST['kannada']); gives %26%233221%3B%26%233240%3B%26%233277%3B%26%233240%3B%26%233233%3B On my local server: $_POST['kannada']='ಕನ್ನಡ'; rawurlencode($_POST['kannada']) gives…
Krish Gowda
  • 193
  • 2
  • 17
1
vote
1 answer

How to validate Request.RawUrl in Application_BeginRequest event in Global.asax.cs file?

Some bots are requesting URLs like www.example.com/test-

they-are-angry... which is creating A potentially dangerous exception in my asp.net application. I need to validate the HttpContext.Current.Request.RawUrl in Application_BeginRequest…

user2338652
  • 467
  • 2
  • 6
  • 13
1
vote
3 answers

How do I get the un-decoded request URL under ASP.NET?

My request URL is: http://domain.com/some/path%2Fescaped. I want to retrieve this exact URL. I do NOT want it decoded, like http://domain.com/some/path/escaped; I want it encoded like http://domain.com/some/path%2Fescaped. How do I get this URL? I…
Chad Johnson
  • 21,215
  • 34
  • 109
  • 207
1
vote
1 answer

single quote JS encodeuri vs PHP rawurlencode

I'm trying to imitate a POST request made by AJAX in PHP with cURL. One thing I noticed, why does PHP escapes the single quote as %27 while JS's encodeuricomponent leaves it like it is? Is there really a function in PHP that's actually THE SAME as…
Sandro Antonucci
  • 1,683
  • 5
  • 29
  • 59
0
votes
1 answer

Alternate for Request.RawUrl in javascript/jquery?

I was using a Request.RawUrl to get the URL after localhost. i.e if my url is localhost:52482/something/somethingelse, then this used to return /something/somethingelse. I accessed this in a base controller(MVC3).But i found out that if there are…
KeenUser
  • 5,305
  • 14
  • 41
  • 62
0
votes
1 answer

GitHub Token Expire

I had put a image on GitHub like this master/required_image/demo.png . I have generated a raw URL as https://raw.githubusercontent.com/?token=GHSAT0AAAAAABRCB4PMH5JDBZHYBB5OBKO4YPY7CVQ The problem with this is that it had token attached…
0
votes
0 answers

Different results of UTF-8 encoding to URL parameter with particular languages between RawUrl and QueryString in HttpRequest

Update - 31 Aug string test = "ö"; string unicode1 = HttpUtility.UrlEncode(test, Encoding.Unicode); string unicode2 = HttpUtility.UrlEncodeUnicode(test); Console.WriteLine("Result of unicode1: " + unicode1); Console.WriteLine("Result of unicode2: "…
yuc
  • 13
  • 5
0
votes
2 answers

php parse string without decoding

My $_SERVER['QUERY_STRING'] returns this: route=common/home/test/aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g%2Fdj1iZWsxeTJ1aVFHQQ%3D%3D/456¶m2=test As we can see that there is base64 encoded string passed with get request. I want to parse route…
0
votes
3 answers

Substituting whitespaces with %20 in PHP. urlencode and rawurlencode does not work

I'm trying to constitute a URL from a multi-word string: so I have $str = "my string" and I 'm trying to get : "http mysite.com/search/my%20string" but I could not do it with PHP. urlencode($str) => "my+string" rawurlencode($str)=>"my string" how…
jeff
  • 13,055
  • 29
  • 78
  • 136
0
votes
2 answers

Response.Redirect in Application_AuthenticateRequest RawUrl

I am using a Response.Redirect in global.asax.cs. When the page loads the RawUrl property contains an encoded directory of some…
Jim
  • 14,952
  • 15
  • 80
  • 167
0
votes
2 answers

Please explain this strange output by mcrypt_decrypt

I am using this code to decrypt the information sent by GET on the other hand: $key ="key"; $ema =$_GET['email']; $iv =$_GET['iv']; $ema =substr($ema,1,-1); $iv …
user2003663
  • 45
  • 1
  • 9