Menu ▾ ▴

#1266 Range glob 'step' input validation

closed-fixed
None
4
2013-08-18
2013-08-15
Will Dietz
No

Summary

curl is overly liberal with the 'step' portion of accepted range glob patterns, as demonstrated in the following examples.

This is separate from failure to reject ranges involving numbers too large to fit into an integer as reported here: https://sourceforge.net/p/curl/bugs/1265/.

Wraparound/overflow due to step:

:::sh
$ curl "http://localhost/[a-z:256]"
$ curl "http://localhost/[1-10:2147483647]"

Negative step:

:::sh
$ curl "http://localhost/[a-z:-1]"
$ curl "http://localhost/[1-10:-1]"

Non-numeric step:

:::sh
$ curl "http://localhost/[a-z:asdf]"

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2013-08-15

    Confirmed. I have a pending fix for this.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-15
    • status: open --> open-confirmed
    • assigned_to: Daniel Stenberg
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-18
    • status: open-confirmed --> closed-fixed
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-18

    Fixed in git, commit 5ca96cb84410