Menu

#32 Query String Parser return wrong value

0.7.8
closed-fixed
None
3
2018-01-08
2018-01-05
No

If the raw query string ends in "=", then uriDissectQueryMallocA return key name appended with = only, For example if link is www.xyz.com?firsname=sdsd&lastname= then result wille be -
key - firsname value - sdsd
key - lastname= value - null
It should not be "lastname=". It should be just "lastname"

Discussion

  • Parteek Makkar

    Parteek Makkar - 2018-01-06

    Really appreciate your quick response. Let me check my code, I must be doing some thing wrong.

     
  • Parteek Makkar

    Parteek Makkar - 2018-01-06

    Is it the same behavior in 0.7.5?

     
  • Sebastian Pipping

    • Group: 0.8.4 --> 0.7.8
     
  • Sebastian Pipping

    Hi!

    I found this bug to be a duplicate of bug 12 (ex 3590761) now and to be fixed since uriparser 0.7.8 by commit abb4153da87117c3c14f3fd5fb5f7df148232b2e. This is what I did on the shell to find it:

    # git diff uriparser-0.7.5 master -- {lib,src}/UriQuery.c                                                                                                                                     
    [..]
    
    # git blame -- src/UriQuery.c | fgrep 'if (walk + 1 <= afterLast) {'                                                                                      
    abb4153d src/UriQuery.c (Sebastian Pipping 2012-12-10 00:38:23 +0100 426)                               if (walk + 1 <= afterLast) {
    
    # git show abb4153d                                                                                                                                                                           
    [..]
    
    # git tag --contains abb4153d | head -n 1
    uriparser-0.7.8
    

    Closing as fixed.

    PS: If you code using uriparser is not listed at http://uriparser.sourceforge.net/#users, I'd be curious to learn what it is, if you're allowed to tell.

     
  • Sebastian Pipping

    • status: open --> closed-fixed
    • assigned_to: Sebastian Pipping
     
  • Parteek Makkar

    Parteek Makkar - 2018-01-08

    Yeah I saw that bug already :), I have to ask if I am allowed to mention my product name. I will let you know.

     

Log in to post a comment.