Security Basics mailing list archives

REGEX BYPASS?


From: "bastian.wild () gmx de" <bastian.wild () gmx de>
Date: Thu, 21 Apr 2011 12:04:41 +0200

Hello all,
i got a question: a friend of mine was analysing some code and found a thing like following


|
||    $a=preg_replace('#\/\*.*\*\/#sU','',$a);
   if(preg_match('#[^0-9]#',$a)) die();

so i was wondering if you can bypass this?

since the first regex tries to avoud comments like /**/ but it bypassable there should be a way to get through the numeric check.
is there?
i cant figure it out!
thanks all

cheers
  |

------------------------------------------------------------------------
Securing Apache Web Server with thawte Digital Certificate
In this guide we examine the importance of Apache-SSL and who needs an SSL certificate.  We look at how SSL works, how 
it benefits your company and how your customers can tell if a site is secure. You will find out how to test, purchase, 
install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for set-up are 
highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates.

http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1
------------------------------------------------------------------------


Current thread: