mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-15 14:16:08 -06:00
fix empty arrays
This commit is contained in:
parent
2862242ae6
commit
1eef0c123a
4 changed files with 4 additions and 4 deletions
|
|
@ -30,6 +30,6 @@ indent_style = tab
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[.gitlab-ci.yml}]
|
[.gitlab-ci.yml]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
||||||
|
|
@ -323,6 +323,8 @@ class BUIConfig(dict):
|
||||||
"'{}': no such validator".format(cast)
|
"'{}': no such validator".format(cast)
|
||||||
)
|
)
|
||||||
return val
|
return val
|
||||||
|
if cast == 'force_list' and val is None:
|
||||||
|
val = []
|
||||||
ret = caster(val)
|
ret = caster(val)
|
||||||
# special case for boolean and integer, etc.
|
# special case for boolean and integer, etc.
|
||||||
if ret is None:
|
if ret is None:
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ def sanitize_string(string, strict=True, paranoid=False):
|
||||||
else:
|
else:
|
||||||
import re
|
import re
|
||||||
ret = repr(string).replace('\\\\', '\\')
|
ret = repr(string).replace('\\\\', '\\')
|
||||||
ret = re.sub(r"^u?'(.*)'$", r"\1", ret)
|
ret = re.sub(r"^u?(?P<quote>['\"])(.*)(?P=quote)$", r"\1", ret)
|
||||||
return to_unicode(ret)
|
return to_unicode(ret)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,8 +251,6 @@ class BUIServer(Flask):
|
||||||
)
|
)
|
||||||
self.format_labels = []
|
self.format_labels = []
|
||||||
for format_label in format_labels:
|
for format_label in format_labels:
|
||||||
if not format_label:
|
|
||||||
continue
|
|
||||||
search = re.search(r'^s(?P<separator>.)(?P<regex>.*?)(?P=separator)(?P<replace>.*?)(?P=separator)$', format_label)
|
search = re.search(r'^s(?P<separator>.)(?P<regex>.*?)(?P=separator)(?P<replace>.*?)(?P=separator)$', format_label)
|
||||||
if search:
|
if search:
|
||||||
self.format_labels.append((search.group('regex'), search.group('replace')))
|
self.format_labels.append((search.group('regex'), search.group('replace')))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue