[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16297344#comment-16297344
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9593:
--------------------------------------------

blueorangutan commented on issue #1760: CLOUDSTACK-9593: userdata: enforce data 
is a multiple of 4 characters
URL: https://github.com/apache/cloudstack/pull/1760#issuecomment-352870322
 
 
   <b>Trillian test result (tid-1828)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 28907 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1760-t1828-kvm-centos7.zip
   Smoke tests completed. 62 look OK, 5 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_vpc_privategw_acl | `Failure` | 46.70 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Failure` | 218.40 | 
test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 198.33 | 
test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 308.92 | 
test_privategw_acl.py
   test_02_create_template_with_checksum_sha1 | `Error` | 5.26 | 
test_templates.py
   test_03_create_template_with_checksum_sha256 | `Error` | 5.22 | 
test_templates.py
   test_04_create_template_with_checksum_md5 | `Error` | 5.24 | 
test_templates.py
   test_08_resize_volume | `Error` | 312.38 | test_volumes.py
   test_09_delete_detached_volume | `Error` | 186.87 | test_volumes.py
   test_10_list_volumes | `Error` | 172.32 | test_volumes.py
   test_01_vpc_remote_access_vpn | `Error` | 45.81 | test_vpc_vpn.py
   test_hostha_kvm_host_degraded | `Error` | 26.01 | test_hostha_kvm.py
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> User data check is inconsistent with python
> -------------------------------------------
>
>                 Key: CLOUDSTACK-9593
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9593
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.4.2, 4.4.3, 4.3.2, 4.5.1, 4.4.4, 4.5.2, 4.6.0, 4.6.1, 
> 4.6.2, 4.7.0, 4.7.1, 4.8.0, 4.9.0
>            Reporter: Marc-Aurèle Brothier
>            Assignee: Marc-Aurèle Brothier
>
> The user data is validated through the Apache commons codec library, but this 
> library does not check that the length is a multiple of 4 characters. The RFC 
> does not require it either. But the python script in the virtual router that 
> loads the user data does check for the possible padding presence, requiring 
> the string to be a multiple of 4 characters.
> {code:python}
> >>> import base64
> >>> base64.b64decode('foo')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File 
> "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/base64.py",
>  line 78, in b64decode
>     raise TypeError(msg)
> TypeError: Incorrect padding
> >>> base64.b64decode('foo=')
> '~\x8a'
> {code}
> Currently since the java check is less restrictive, the user data gets saved 
> into the database but the VR script crashes when it receives this VM user 
> data. On a single VM it is not really a problem. The critical issue is when a 
> VR is restarted. The invalid pythonic base64 string makes the vmdata.py 
> script crashed, resulting in a VR not starting at all.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to