mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-03-31 01:35:54 +00:00
added condition for private services
This commit is contained in:
parent
304905a64f
commit
c14d7a0f60
@ -882,6 +882,12 @@ class WebBrowser extends LitElement {
|
|||||||
response = JSON.stringify(data);
|
response = JSON.stringify(data);
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
if (!data.encrypt && data.service.endsWith("_PRIVATE")) {
|
||||||
|
let data = {};
|
||||||
|
data['error'] = "Only encrypted data can go into private services";
|
||||||
|
response = JSON.stringify(data);
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
if (data.encrypt) {
|
if (data.encrypt) {
|
||||||
try {
|
try {
|
||||||
@ -1042,6 +1048,10 @@ class WebBrowser extends LitElement {
|
|||||||
identifier = 'default';
|
identifier = 'default';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!data.encrypt && service.endsWith("_PRIVATE")) {
|
||||||
|
throw new Error("Only encrypted data can go into private services")
|
||||||
|
}
|
||||||
|
|
||||||
if (data.encrypt) {
|
if (data.encrypt) {
|
||||||
try {
|
try {
|
||||||
const encryptDataResponse = encryptData({
|
const encryptDataResponse = encryptData({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user