diff --git a/client/src/actions/index.js b/client/src/actions/index.js index be4e4d7e..be3a8c65 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -659,8 +659,8 @@ export const getTlsStatus = () => async (dispatch) => { dispatch(getTlsStatusRequest()); try { const status = await apiClient.getTlsStatus(); - status.certificate_chain = decodeURIComponent(status.certificate_chain); - status.private_key = decodeURIComponent(status.private_key); + status.certificate_chain = atob(status.certificate_chain); + status.private_key = atob(status.private_key); dispatch(getTlsStatusSuccess(status)); } catch (error) { @@ -677,8 +677,8 @@ export const setTlsConfig = config => async (dispatch) => { dispatch(setTlsConfigRequest()); try { const values = { ...config }; - values.certificate_chain = encodeURIComponent(values.certificate_chain); - values.private_key = encodeURIComponent(values.private_key); + values.certificate_chain = btoa(values.certificate_chain); + values.private_key = btoa(values.private_key); await apiClient.setTlsConfig(values); dispatch(setTlsConfigSuccess(config));