Re: [MMUSIC] Magnus Westerlund's Discuss on draft-ietf-mmusic-data-channel-sdpneg-25: (with DISCUSS and COMMENT)

Adam Roach <adam@nostrum.com> Mon, 08 April 2019 15:55 UTC

Return-Path: <adam@nostrum.com>
X-Original-To: mmusic@ietfa.amsl.com
Delivered-To: mmusic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 592E5120026; Mon, 8 Apr 2019 08:55:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.679
X-Spam-Level:
X-Spam-Status: No, score=-1.679 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HTML_MESSAGE=0.001, T_SPF_HELO_PERMERROR=0.01, T_SPF_PERMERROR=0.01] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=nostrum.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6gMors0R94Iq; Mon, 8 Apr 2019 08:55:36 -0700 (PDT)
Received: from nostrum.com (raven-v6.nostrum.com [IPv6:2001:470:d:1130::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C0B9F120183; Mon, 8 Apr 2019 08:55:32 -0700 (PDT)
Received: from MacBook-Pro.roach.at (99-152-146-228.lightspeed.dllstx.sbcglobal.net [99.152.146.228]) (authenticated bits=0) by nostrum.com (8.15.2/8.15.2) with ESMTPSA id x38FtQFo032449 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 8 Apr 2019 10:55:28 -0500 (CDT) (envelope-from adam@nostrum.com)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nostrum.com; s=default; t=1554738929; bh=3hH6DcdI82j6LtthakTjzz2U0aZY9sHgCQd2AppzomU=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=OxMADz5k9b/Iqfw8StG/1diqIxupEkqibhNEif1lJHqF5F88KOr/g7eWcuTBg+3bf +6pu80pHuY404OuKAuhhicdkgoLrx+WYdoiLA+JHTtQMShWIEFVjWjjDEey4fRk4+u 4P1J0zwMLUHW9vyBzmAlWFHriZ/D4cDNfgGKzuQ0=
X-Authentication-Warning: raven.nostrum.com: Host 99-152-146-228.lightspeed.dllstx.sbcglobal.net [99.152.146.228] claimed to be MacBook-Pro.roach.at
To: Magnus Westerlund <magnus.westerlund@ericsson.com>, The IESG <iesg@ietf.org>
Cc: mmusic-chairs@ietf.org, draft-ietf-mmusic-data-channel-sdpneg@ietf.org, mmusic@ietf.org
References: <155446588097.13196.6373243259627185094.idtracker@ietfa.amsl.com>
From: Adam Roach <adam@nostrum.com>
Message-ID: <1afcb116-36cb-be51-81ac-e78fc52c9255@nostrum.com>
Date: Mon, 8 Apr 2019 10:55:21 -0500
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <155446588097.13196.6373243259627185094.idtracker@ietfa.amsl.com>
Content-Type: multipart/alternative; boundary="------------F0F513F38398714468D917D5"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/mmusic/EuoBE04QiBILTQV2ixhupMK6YFw>
Subject: Re: [MMUSIC] Magnus Westerlund's Discuss on draft-ietf-mmusic-data-channel-sdpneg-25: (with DISCUSS and COMMENT)
X-BeenThere: mmusic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Multiparty Multimedia Session Control Working Group <mmusic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mmusic>, <mailto:mmusic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mmusic/>
List-Post: <mailto:mmusic@ietf.org>
List-Help: <mailto:mmusic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mmusic>, <mailto:mmusic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Apr 2019 15:55:39 -0000

On 4/5/19 7:04 AM, Magnus Westerlund via Datatracker wrote:
> ----------------------------------------------------------------------
> DISCUSS:
> ----------------------------------------------------------------------
>
> There might be a serious issue in label definition.
>
> 5.1.3.  Label Parameter
>
>     The 'label' parameter indicates the name of the channel.  It
>     represents a label that can be used to distinguish, in the context of
>     the WebRTC API [WebRtcAPI], an RTCDataChannel object from other
>     RTCDataChannel objects.  This parameter maps to the 'Label' parameter
>     defined in [I-D.ietf-rtcweb-data-protocol].  The 'label' parameter is
>     optional.  If it is not present, then its value defaults to the empty
>     string.
>
>    label-opt       = "label=" quoted-string
>    quoted-string   = DQUOTE *(quoted-char / escaped-char) DQUOTE
>    quoted-char     = SP / quoted-visible
>    quoted-visible  = %x21 / %x23-24 / %x26-7E ; VCHAR without " or %
>    escaped-char    = "%" HEXDIG HEXDIG
>
> I interpret that as the intention is to enable the SDP Attribute to carry the
> label as defined in W3C API. That value is in the current candidatate
> specification an https://www.w3.org/TR/webrtc/ as an USVSsting
> (https://heycam.github.io/webidl/#idl-USVString). And in the reference version
> of the WebRTC API as an DOMstring. Both are not limited to ASCII and may
> contain any Unicode characters. Thus the escaping mechanism defined appear to
> be insufficient.
>
> I think the "quoted-string" need a definition of what type of string this truly
> are so that it is clear what a character in the string is.
>
> In addition the specification of escaping is undersspecified. I would recommend
> at least adding discussion of the need and how to escape DQUOTE and % that can
> be relatively common operations.


I can see that this could benefit from some explicit detail about how to 
convert the cited USVString string into the "quoted-string" construct 
defined here. I think this roughly consists of:

  * Serialize the WebRTC label as a UTF-8 string
  * Treat the UTF-8 serialization as a series of bytes
  * For each byte in the serialization:
      o If the byte can be expressed as a `quoted-char`, do so
      o Otherwise, express the byte as an `escaped-char`.

Would including text to that effect satisfy your concern?

/a