Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1628F200BC7 for ; Fri, 25 Nov 2016 11:30:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 14C4D160B1C; Fri, 25 Nov 2016 10:30:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5DD5F160AF6 for ; Fri, 25 Nov 2016 11:29:59 +0100 (CET) Received: (qmail 19602 invoked by uid 500); 25 Nov 2016 10:29:58 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 19589 invoked by uid 500); 25 Nov 2016 10:29:58 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 19583 invoked by uid 99); 25 Nov 2016 10:29:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Nov 2016 10:29:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5B4D32C03DE for ; Fri, 25 Nov 2016 10:29:58 +0000 (UTC) Date: Fri, 25 Nov 2016 10:29:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9593) User data check is inconsistent with python MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 25 Nov 2016 10:30:00 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9593?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15695511#comment-15695511 ]=20 ASF GitHub Bot commented on CLOUDSTACK-9593: -------------------------------------------- Github user marcaurele commented on the issue: https://github.com/apache/cloudstack/pull/1760 =20 right, I forgot about the match required with the version in the pom. I= thought I should prepare the stuff for the next 4.9.x release but that can= not work unless the pom files are updated too. I will just move the code in= side Upgrade490to4910.java to Upgrade4910to4920.java when it's available. > User data check is inconsistent with python > ------------------------------------------- > > Key: CLOUDSTACK-9593 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-959= 3 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > 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=C3=A8le Brothier > Assignee: Marc-Aur=C3=A8le 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 ro= uter 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 "", line 1, in > File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versi= ons/2.7/lib/python2.7/base64.py", line 78, in b64decode > raise TypeError(msg) > TypeError: Incorrect padding > >>> base64.b64decode('foo=3D') > '~\x8a' > {code} > Currently since the java check is less restrictive, the user data gets sa= ved into the database but the VR script crashes when it receives this VM us= er data. On a single VM it is not really a problem. The critical issue is w= hen 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.3.4#6332)