summaryrefslogtreecommitdiff
path: root/rest-api
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-08-21 16:23:59 +0000
committerDavid M. Lee <dlee@digium.com>2013-08-21 16:23:59 +0000
commit5762c1b4ac5c1519463b31ab7078fcd9cb55a393 (patch)
treee4b1dd24f8908070538a5eeec1bbc8379a0ed934 /rest-api
parenta6da087716478b4a54defb17d56a9574548a8d2a (diff)
ARI: Correct segfault with /variable calls are missing ?variable parameter.
Both /asterisk/variable and /channel/{channelId}/variable requires a ?variable parameter to be passed into the query. But we weren't checking for the parameter being missing, which caused a segfault. All calls now properly return 400 Bad Request errors when the parameter is missing. The Swagger api-docs were updated accordingly. (closes issue ASTERISK-22273) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rest-api')
-rw-r--r--rest-api/api-docs/asterisk.json12
-rw-r--r--rest-api/api-docs/channels.json8
2 files changed, 20 insertions, 0 deletions
diff --git a/rest-api/api-docs/asterisk.json b/rest-api/api-docs/asterisk.json
index cbed1895c..723c6d820 100644
--- a/rest-api/api-docs/asterisk.json
+++ b/rest-api/api-docs/asterisk.json
@@ -55,6 +55,12 @@
"allowMultiple": false,
"dataType": "string"
}
+ ],
+ "errorResponses": [
+ {
+ "code": 400,
+ "reason": "Missing variable parameter."
+ }
]
},
{
@@ -79,6 +85,12 @@
"allowMultiple": false,
"dataType": "string"
}
+ ],
+ "errorResponses": [
+ {
+ "code": 400,
+ "reason": "Missing variable parameter."
+ }
]
}
]
diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json
index 41b6cc08c..0f3b8e20e 100644
--- a/rest-api/api-docs/channels.json
+++ b/rest-api/api-docs/channels.json
@@ -754,6 +754,10 @@
],
"errorResponses": [
{
+ "code": 400,
+ "reason": "Missing variable parameter."
+ },
+ {
"code": 404,
"reason": "Channel not found"
},
@@ -796,6 +800,10 @@
],
"errorResponses": [
{
+ "code": 400,
+ "reason": "Missing variable parameter."
+ },
+ {
"code": 404,
"reason": "Channel not found"
},