RE: [sarif] Clarification about uri encoding

From
Laurence Golding
Date
2019-04-08T16:54:00+00:00
ID
Thread
RE: [sarif] Clarification about uri encoding
Ah, there it is:




 segment        = *pchar

   segment-nz    = 1*pchar

   segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )

                 ; non-zero-length segment without any colon ":"



   pchar         = unreserved / pct-encoded / sub-delims /
  ":"  / "@"
From:
 <>
  On Behalf Of  Larry Golding (Myriad Consulting Inc)

Sent:  Monday, April 8, 2019 9:52 AM
To:  Paul Anderson <>; 
Subject:  RE: [sarif] Clarification about uri encoding



Yes, it is allowed, but the spec says


  Two URI references  SHALL  be considered equivalent if their normalized forms are the same, as described in [ RFC3986 ].



which means that before you compare you d have to un-escape it back to a colon
or is it the other way around? I d have to go back to the RFC to recall whether you can have a  :  in a path segment.



Larry
From:
    < 
>
  On Behalf Of  Paul Anderson
  Sent:  Monday, April 8, 2019 9:29 AM
To:

Subject:  [sarif] Clarification about uri encoding


  All:
  Is it valid SARIF to have a uri encoded like this:
 "file:///c%3A/tmp/foo.c" , and for this to be considered the same as
 "file:///c:/tmp/foo.c" ?
  My reading is  yes , the encoding of the colon in that position is optional, but I just want to make sure....
  Thanks,
  -Paul

--
Paul Anderson, VP of Engineering, GrammaTech, Inc.
  531 Esty St.,
Ithaca, NY 14850
Tel: +1 607 273-7340 x118;  http://www.grammatech.com