shwstppr commented on PR #9575: URL: https://github.com/apache/cloudstack/pull/9575#issuecomment-2315167091
> @kiranchavala I've added a fix for the UI encoding, by invoking `encodeURI` instead of `encodeURIComponent` for the base64 encoded userdata, this prevents encoding base64 special characters > <img alt="Screenshot 2024-08-27 at 19 13 54" width="444" src="https://private-user-images.githubusercontent.com/5295080/361996377-bc6a4ecd-ef9b-4927-8b7b-8ef19e51f195.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4NDE4OTcsIm5iZiI6MTcyNDg0MTU5NywicGF0aCI6Ii81Mjk1MDgwLzM2MTk5NjM3Ny1iYzZhNGVjZC1lZjliLTQ5MjctOGI3Yi04ZWYxOWU1MWYxOTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjhUMTAzOTU3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDY5YzBkOTdhZjJhYWE5YTI2ZWEzMDQ1Y2VlZGU0YTA3MjZkZDljZmY4NmYyMGQzZWY4OTU2OWViOWUzM2FmMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.hH1euWP7SCgTfVPxePoqlShdPifeJCUqLXNHeGNEFBE"> > > (in the example, before the fix the last `==` chars were encoded as well by the encodeURIComponent function) > > cc @shwstppr @weizhouapache @nvazquez I tested a main branch env. I passed the following userdata in the deploy VM form, ``` abcdefghijklmnop ``` In the DB I could see the following, ``` mysql> select * from user_vm where id=5\G; *************************** 1. row *************************** id: 5 iso_id: NULL display_name: NULL user_data: YWJjZGVmZ2hpamtsbW5vcA== user_data_id: NULL user_data_details: NULL update_parameters: 1 user_vm_type: NULL 1 row in set (0.00 sec) ERROR: No query specified ```` So I'm not sure if it is an UI issue -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
