1
0
mirror of https://github.com/ArcticFoxes-net/ONC-Converter synced 2024-11-09 13:51:33 -05:00

No need to make values safe, no quotes around x509 name

This commit is contained in:
thomkeh 2018-07-17 16:52:26 +01:00 committed by GitHub
parent c66de4268e
commit 225b541cb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,7 +126,7 @@
// closing tag was found
// make sure the tag name and the contents are safe
const name = makeSafe(xmlTag)
const value = makeSafe(xmlContent)
const value = xmlContent
// store everything and reset the xml variables
keys[name] = value
ovpn[name] = name
@ -146,7 +146,7 @@
if (!match) continue
// make sure everything is safe and then store it
const key = makeSafe(match[1])
const value = match[2] ? makeSafe((match[3] || '')) : true
const value = match[2] ? (match[3] || '') : true
ovpn[key] = value
}
@ -257,7 +257,7 @@
if (x509String.includes("'")) {
// the name is quoted with '
const parts = x509String.split("'")
x509['Name'] = `'${parts[1]}'`
x509['Name'] = parts[1]
if (parts[2]) {
x509['Type'] = parts[2].trim()
}