Skip to content

Commit 8a2ad7d

Browse files
committed
Minor update of swagger YAML
1 parent e12d7a2 commit 8a2ad7d

3 files changed

Lines changed: 24 additions & 28 deletions

File tree

data/txt/sha256sums.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ c03dc585f89642cfd81b087ac2723e3e1bb3bfa8c60e6f5fe58ef3b0113ebfe6 lib/core/data.
188188
48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py
189189
0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py
190190
888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py
191-
78a7197b843f1766159e803ccc5724880bea795ad6bd2e06eddb746db3324129 lib/core/settings.py
191+
82195feebdc5ec2fe764048643061d0769d333f583933d202c99eede64a41e2f lib/core/settings.py
192192
cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py
193193
bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py
194194
70ea3768f1b3062b22d20644df41c86238157ec80dd43da40545c620714273c6 lib/core/target.py
@@ -490,7 +490,7 @@ cedf45d33461bd7e5400d06611a63c8a4ffae1a4510030c5696b9d46ed6a9883 plugins/generi
490490
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 plugins/__init__.py
491491
5d72f0af46ff3c9e3fe80300e83cb78749132278e8db88915764a94d7130a04c README.md
492492
7ef0d0ea10d4b19283b1e380d521abb0fdd4c6bf1443b88f7b00af7947fc5e27 sqlmapapi.py
493-
5b73370e455ee5d4cfd72db7485223528d3ede2637e74469fac9ba9f8a2b9d13 sqlmapapi.yaml
493+
ca368eb28b653d22adace174fe7925df2dccbae38282c6c4f5c6dd64a8360fb4 sqlmapapi.yaml
494494
627d90f1194335b800cbc9cc78db6697cf9e02e193a83598e0d4d0abb55b63b8 sqlmap.conf
495495
65159b82795604069a2d14ccbd1f66e888a26b05db0401a1ddadb40c665c93dc sqlmap.py
496496
eb37a88357522fd7ad00d90cdc5da6b57442b4fec49366aadb2944c4fbf8b804 tamper/0eunion.py

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.10.6.79"
23+
VERSION = "1.10.6.80"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

sqlmapapi.yaml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ paths:
232232
parameters:
233233
- $ref: "#/components/parameters/TaskId"
234234
requestBody:
235-
required: true
235+
required: false
236236
content:
237237
application/json:
238238
schema:
@@ -272,13 +272,7 @@ paths:
272272
Sets one or more options on a task. Values are persisted in the task option
273273
object and are used when the scan is started.
274274
275-
Hardened behavior: options listed in `x-sqlmap-unsupported-options` should be
276-
rejected here with `success: false`, matching `/scan/{taskid}/start`.
277-
x-sqlmap-unsupported-options:
278-
- sqlShell
279-
- wizard
280-
- evalCode
281-
- alert
275+
Unsupported, read-only, and unknown options are rejected with `success: false`.
282276
parameters:
283277
- $ref: "#/components/parameters/TaskId"
284278
requestBody:
@@ -315,6 +309,10 @@ paths:
315309
value:
316310
success: false
317311
message: "Unsupported option 'evalCode'"
312+
unknownOption:
313+
value:
314+
success: false
315+
message: "Unknown option 'doesNotExist'"
318316
"401":
319317
$ref: "#/components/responses/Unauthorized"
320318

@@ -327,13 +325,8 @@ paths:
327325
Applies the provided options to the task and starts sqlmap in a separate process.
328326
The response contains the spawned engine process ID.
329327
330-
Current API behavior rejects options listed in `x-sqlmap-unsupported-options`
331-
when they are supplied in this request body.
332-
x-sqlmap-unsupported-options:
333-
- sqlShell
334-
- wizard
335-
- evalCode
336-
- alert
328+
Unsupported, read-only, and unknown options are rejected with `success: false`.
329+
Starting a scan for an already running task returns `success: false`.
337330
parameters:
338331
- $ref: "#/components/parameters/TaskId"
339332
requestBody:
@@ -364,6 +357,14 @@ paths:
364357
value:
365358
success: false
366359
message: "Unsupported option 'evalCode'"
360+
unknownOption:
361+
value:
362+
success: false
363+
message: "Unknown option 'doesNotExist'"
364+
scanAlreadyRunning:
365+
value:
366+
success: false
367+
message: Scan already running
367368
invalidJson:
368369
value:
369370
success: false
@@ -647,10 +648,6 @@ components:
647648
message: Invalid start or end value, must be digits
648649

649650
schemas:
650-
SuccessFlag:
651-
type: boolean
652-
description: Indicates whether the API action succeeded.
653-
654651
ErrorResponse:
655652
type: object
656653
required: [success, message]
@@ -726,7 +723,7 @@ components:
726723

727724
OptionValue:
728725
description: Value accepted by sqlmap options. The exact type depends on the option.
729-
oneOf:
726+
anyOf:
730727
- type: string
731728
nullable: true
732729
- type: boolean
@@ -741,8 +738,8 @@ components:
741738
type: object
742739
description: |
743740
Dynamic object containing sqlmap option names and values. Option names map to
744-
sqlmap's internal option dictionary. Unsupported REST API options should be
745-
rejected by endpoints that accept this object.
741+
sqlmap's internal option dictionary. Unsupported, read-only, and unknown
742+
options are rejected by endpoints that accept this object.
746743
additionalProperties:
747744
$ref: "#/components/schemas/OptionValue"
748745
example:
@@ -764,8 +761,7 @@ components:
764761

765762
OptionGetRequest:
766763
type: array
767-
description: List of option names to return.
768-
minItems: 1
764+
description: List of option names to return. Empty or missing input returns an empty options object.
769765
items:
770766
type: string
771767
minLength: 1
@@ -826,7 +822,7 @@ components:
826822
description: Numeric content type stored by sqlmap.
827823
example: 0
828824
value:
829-
oneOf:
825+
anyOf:
830826
- type: string
831827
nullable: true
832828
- type: boolean

0 commit comments

Comments
 (0)