Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jagpreet 4 posts 24 karma points
    Dec 15, 2012 @ 20:59
    Jagpreet
    0

    Invalid RegularExpressionValidator in umbraco 4.11.1 domain matching?

    I was trying to set http://local-shortcuts:1379/en-us/test  as one of the URLs in manage hostnames. But I kept getting an invalid hostname error. I stepped into umbraco's code and found this regex:

    DomainValidator2.ValidationExpression = @"^(\*|((?i:http[s]?://)?([-\w]+(\.[-\w]+)*)(:\d+)?(/[-\w]*)?))$";

     

    When regex skills are not too good but it looks to me that (/[-\w]*)? should have been ([-\/\w]*)?  instead. The / character should be inside.

    Am I correct?

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies