1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #5742: Do not double scape provision body (#2045)

This commit is contained in:
Alejandro Huertas Herrero 2022-05-13 12:48:23 +02:00 committed by GitHub
parent 56947c9962
commit f52c02ae30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,10 @@ class OneDBLive
def db_escape(string)
escaped = string.gsub("'", "''")
# Provision documents are already scaped
return escaped if string.include?("\"ar_template\":\"AR=[")
escaped.gsub('\\') { '\\\\' }
end