Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
93de1e49
You need to sign in or sign up before continuing.
Commit
93de1e49
authored
Apr 12, 2020
by
neil
Browse files
un-escape json chars
fix
https://github.com/acmesh-official/acme.sh/issues/2833
parent
5ace4449
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
93de1e49
...
@@ -846,6 +846,14 @@ _json_encode() {
...
@@ -846,6 +846,14 @@ _json_encode() {
echo
"
$_j_str
"
| _hex_dump | _lower_case |
sed
's/0a/5c 6e/g'
|
tr
-d
' '
| _h2b |
tr
-d
"
\r\n
"
echo
"
$_j_str
"
| _hex_dump | _lower_case |
sed
's/0a/5c 6e/g'
|
tr
-d
' '
| _h2b |
tr
-d
"
\r\n
"
}
}
#from: http:\/\/ to http://
_json_decode
()
{
_j_str
=
"
$(
sed
's#\\/#/#g'
)
"
_debug3
"_json_decode"
_debug3
"_j_str"
"
$_j_str
"
echo
"
$_j_str
"
}
#options file
#options file
_sed_i
()
{
_sed_i
()
{
options
=
"
$1
"
options
=
"
$1
"
...
@@ -4019,7 +4027,7 @@ issue() {
...
@@ -4019,7 +4027,7 @@ issue() {
#for dns manual mode
#for dns manual mode
_savedomainconf
"Le_OrderFinalize"
"
$Le_OrderFinalize
"
_savedomainconf
"Le_OrderFinalize"
"
$Le_OrderFinalize
"
_authorizations_seg
=
"
$(
echo
"
$response
"
| _egrep_o
'"authorizations" *: *\[[^\[]*\]'
|
cut
-d
'['
-f
2 |
tr
-d
']'
|
tr
-d
'"'
)
"
_authorizations_seg
=
"
$(
echo
"
$response
"
|
_json_decode |
_egrep_o
'"authorizations" *: *\[[^\[]*\]'
|
cut
-d
'['
-f
2 |
tr
-d
']'
|
tr
-d
'"'
)
"
_debug2 _authorizations_seg
"
$_authorizations_seg
"
_debug2 _authorizations_seg
"
$_authorizations_seg
"
if
[
-z
"
$_authorizations_seg
"
]
;
then
if
[
-z
"
$_authorizations_seg
"
]
;
then
_err
"_authorizations_seg not found."
_err
"_authorizations_seg not found."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment