OASIS Static Analysis Results Interchange Format (SARIF) TC

 View Only
  • 1.  RE: [sarif] Clarification about uri encoding

    Posted 04-08-2019 16:54




    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: sarif@lists.oasis-open.org <sarif@lists.oasis-open.org>
    On Behalf Of Larry Golding (Myriad Consulting Inc)
    Sent: Monday, April 8, 2019 9:52 AM
    To: Paul Anderson <paul@grammatech.com>; sarif@lists.oasis-open.org
    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:
    sarif@lists.oasis-open.org < sarif@lists.oasis-open.org >
    On Behalf Of Paul Anderson
    Sent: Monday, April 8, 2019 9:29 AM
    To: sarif@lists.oasis-open.org
    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






  • 2.  Re: [sarif] Clarification about uri encoding

    Posted 04-08-2019 17:14
    Larry: Thanks! I read this as allowing colons in path segments except in the first segment of a relative path. In any case I now have the answer I need. -Paul On 4/8/2019 12:54 PM, Larry Golding (Myriad Consulting Inc) wrote: 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: sarif@lists.oasis-open.org <sarif@lists.oasis-open.org> On Behalf Of Larry Golding (Myriad Consulting Inc) Sent: Monday, April 8, 2019 9:52 AM To: Paul Anderson <paul@grammatech.com> ; sarif@lists.oasis-open.org 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: sarif@lists.oasis-open.org < sarif@lists.oasis-open.org > On Behalf Of Paul Anderson Sent: Monday, April 8, 2019 9:29 AM To: sarif@lists.oasis-open.org 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 -- Paul Anderson, VP of Engineering, GrammaTech, Inc. 531 Esty St., Ithaca, NY 14850 Tel: +1 607 273-7340 x118; http://www.grammatech.com


  • 3.  Re: [sarif] Clarification about uri encoding

    Posted 04-08-2019 17:56
    Yes, exactly,  because in the first segment of a relative path it would look like a scheme. In your absolute URI example, it's allowed even in the first segment. Larry Get Outlook for Android From: Paul Anderson <paul@grammatech.com> Sent: Monday, April 8, 2019 10:14:04 AM To: Larry Golding (Myriad Consulting Inc); sarif@lists.oasis-open.org Subject: Re: [sarif] Clarification about uri encoding   Larry: Thanks! I read this as allowing colons in path segments except in the first segment of a relative path. In any case I now have the answer I need. -Paul On 4/8/2019 12:54 PM, Larry Golding (Myriad Consulting Inc) wrote: 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: sarif@lists.oasis-open.org <sarif@lists.oasis-open.org> On Behalf Of Larry Golding (Myriad Consulting Inc) Sent: Monday, April 8, 2019 9:52 AM To: Paul Anderson <paul@grammatech.com> ; sarif@lists.oasis-open.org 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: sarif@lists.oasis-open.org < sarif@lists.oasis-open.org > On Behalf Of Paul Anderson Sent: Monday, April 8, 2019 9:29 AM To: sarif@lists.oasis-open.org 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 -- Paul Anderson, VP of Engineering, GrammaTech, Inc. 531 Esty St., Ithaca, NY 14850 Tel: +1 607 273-7340 x118; http://www.grammatech.com