0

I am trying to validate the following URL's

http://www.domain.com/foldername/%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd

But this was showing as 403 forbidden of default server error instead of customized error page

My .htaccess file configuration is

ErrorDocument 404 /404.php
ErrorDocument 403 /403.php

For Example,

For this URL we got the customized error page https://stackoverflow.com/welcome

enter image description here

But If we execute this URL we got the default error page of server

https://stackoverflow.com/%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd

enter image description here

How to solve this issue?

Thanks in advance

Community
  • 1
  • 1
Sundar
  • 4,580
  • 6
  • 35
  • 61

1 Answers1

1

You can add to your httpd.conf

AllowEncodedSlashes On 

And restart apache.

After that apache should treat your url as valid. ( so 404 page should be shown )

Pawel Dubiel
  • 18,665
  • 3
  • 40
  • 58