mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-01-25 02:07:59 +00:00
bugfix: reject invalid request-uri with 400 Bad Request
This commit is contained in:
@@ -120,9 +120,9 @@ module.exports = (srf, logger, opts) => {
|
||||
logger.info(`received outbound INVITE to ${req.uri} from server at ${req.server.hostport}`);
|
||||
const uri = parseUri(req.uri);
|
||||
|
||||
if (!uri.user || !uri.host) {
|
||||
if (!uri || !uri.user || !uri.host) {
|
||||
logger.info({uri: req.uri}, 'invalid request-uri on outbound call, rejecting');
|
||||
res.send(404, {
|
||||
res.send(400, {
|
||||
headers: {
|
||||
'X-Reason': 'invalid request-uri'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user