PJSIP Transport - Should allow to set multiples cipher separated by comma

Description

Given
Stack have a PJSIP transport named transport-udp already configured

Then

PUT/api/confd/1.1/sip/transports/{transport_uuid}


Expected
Request to pass


Note
Please validate with asterisk if it’s a valid solution

Zendesk Ticket IDs

None

Activity

Show:

Charles Langlois May 15, 2023 at 9:18 PM

Went the safe/simple way by adding comma in regex.

Pascal Cadotte May 15, 2023 at 8:06 PM

Here’s an example from the asterisk PJSIP config.sample.conf

So we do need to be able to use a , in the values.

This kind of regex is to be sure that a user cannot inject new configurations with a key like bind 0.0.0.0\n\n#exec rm -rf / In the case of PJSIP transport the admin already “owns” the system so I don’t have an objection to remove the regex completely from the transport resource. But newlines should probably be stripped or prohibited

François Blackburn May 15, 2023 at 3:26 PM

About the solution:
The regex is here::

Since we bypass regex for pjsip endpoint, we may want to totally remove this regex (only used by sip transport), because value seems safety escaped
Or we could move the regex to transport sip option only to be more explicit in the code

What do you think about removing totally this regex? Is it worth it, or we only add ,


Done

Details

Priority

Assignee

Reporter

Approvers

Pascal Cadotte

Fix versions

Sprint

Zendesk Support

Created May 12, 2023 at 7:38 PM
Updated June 7, 2023 at 7:35 PM
Resolved May 24, 2023 at 4:00 PM