summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSivaprabu Ganesan <sivaprabug@ami.com>2023-01-06 17:36:04 +0300
committerSivaprabu Ganesan <sivaprabug@ami.com>2023-01-25 14:20:58 +0300
commitc72f1e3e1e87a17faf649b6b4b8fbfd166a11b76 (patch)
tree38b1de2b9b9e5ed647db7644abb4e604adffd41d
parent83ca596d2f131869ba919ce802da553d4ab1ccf8 (diff)
downloadwebui-vue-c72f1e3e1e87a17faf649b6b4b8fbfd166a11b76.tar.xz
Added encodeURIComponent to CSR certificate
Description 1: Downloading the CSR certificate data value without encodeURIComponent function is not supported in Firefox So added the encodeURIComponent function to download the csr certificate Tested: Step 1: Launch WEBUI on firefox Step 2: Navigate to Security and access, Certificates Page Step 3: Generate and Download CSR certificate (KeyPair Algorithm - EC and Key curve id - secp521r1) Step 4: After CSR Downloaded, copy the downloaded file to any of the linux machine Step 5: Try to create an https/ldap certificate via openssl on linux machine Result: Able to download the CSR certificate successfully and able to create https/ldap certificate via openssl Description 2: While downloading the generated csr via Web UI, the csr file is getting downloaded as ".txt" file but it should download as ".csr" file So changed the extension to ".csr" Tested: Step 1: Login to Web UI. Step 2: Navigate to Security and access, Certificates Page Step 3: Click Generate CSR Button and fill the required details Step 4: Click Generate CSR from the popup modal. Step 5: After CSR Generated an prompt will open and it will show download and copy option. In that select download, the csr certificate will download with ".csr" extension Change-Id: Ice176006a95afd53845d7696ce0eac88f02b1096 Signed-off-by: Sivaprabu Ganesan <sivaprabug@ami.com>
-rw-r--r--src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue
index d76f9fe1..6f6fa864 100644
--- a/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue
+++ b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue
@@ -361,8 +361,11 @@
</template>
</b-btn>
<a
- :href="`data:text/json;charset=utf-8,${csrString}`"
- download="certificate.txt"
+ :href="
+ `data:application/json;charset=utf-8,` +
+ encodeURIComponent(`${csrString}`)
+ "
+ download="certificate.csr"
class="btn btn-primary"
>
{{ $t('global.action.download') }}