jain-sip icon indicating copy to clipboard operation
jain-sip copied to clipboard

Reserved characters in SIP URIs are not escaped

Open xhoaluu opened this issue 7 years ago • 0 comments

And JSR 289 (section 4.2.1) says: "Likewise, string values passed to setters for various SIP/SIPS URI components may contain reserved or excluded characters that need escaping before being used. The container is responsible for escaping those values as necessary."

But when we run the following code:

SipURI uri = (SipURI)sipFactory.createURI("sip:[email protected]"); uri.setHeader("email", "[email protected]"); mLogger.debug("4) uri="+uri);

it prints:

  1. uri=sip:[email protected][email protected]

The correct result would have been: uri=sip:[email protected]?email=alice%40priv.com

xhoaluu avatar Dec 20 '17 07:12 xhoaluu