[jira] [Commented] (CLOUDSTACK-5512) template format name checking is crude and doesn't work with advanced URLs
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14094503#comment-14094503 ] ASF subversion and git services commented on CLOUDSTACK-5512: - Commit e3564658befaa72cbe5fd510bea2a25b40f108f5 in cloudstack's branch refs/heads/master from [~minchen07] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=e356465 ] CLOUDSTACK-6940, CLOUDSTACK-7312, CLOUDSTACK-5512: Template/ISO/Volume upload rejects some valid URL formats. Also consolidate URL format check into one util routine. template format name checking is crude and doesn't work with advanced URLs -- Key: CLOUDSTACK-5512 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5512 Project: CloudStack Issue Type: Bug Security Level: Public(Anyone can view this level - this is the default.) Affects Versions: 4.0.0, 4.1.0, 4.2.0 Reporter: Marcus Sorensen Assignee: Rohit Yadav Fix For: 4.4.0 Template name checking currently just looks at the very end of the url string. e.g.: private void checkFormat(String format, String url) { if((!url.toLowerCase().endsWith(vhd)) This breaks functionality such as registering a template via an S3 pre-signed URL, or anything where the file extension is not the last part of the URL. We should at least attempt to parse the URL for filename vs parameters. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CLOUDSTACK-5512) template format name checking is crude and doesn't work with advanced URLs
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14093398#comment-14093398 ] Min Chen commented on CLOUDSTACK-5512: -- ISO check is also removed in https://issues.apache.org/jira/browse/CLOUDSTACK-7312. template format name checking is crude and doesn't work with advanced URLs -- Key: CLOUDSTACK-5512 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5512 Project: CloudStack Issue Type: Bug Security Level: Public(Anyone can view this level - this is the default.) Affects Versions: 4.0.0, 4.1.0, 4.2.0 Reporter: Marcus Sorensen Assignee: Rohit Yadav Fix For: 4.4.0 Template name checking currently just looks at the very end of the url string. e.g.: private void checkFormat(String format, String url) { if((!url.toLowerCase().endsWith(vhd)) This breaks functionality such as registering a template via an S3 pre-signed URL, or anything where the file extension is not the last part of the URL. We should at least attempt to parse the URL for filename vs parameters. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CLOUDSTACK-5512) template format name checking is crude and doesn't work with advanced URLs
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14092472#comment-14092472 ] Harikrishna Patnala commented on CLOUDSTACK-5512: - This was fixed in https://issues.apache.org/jira/browse/CLOUDSTACK-6940, we need to fix the same for ISOs template format name checking is crude and doesn't work with advanced URLs -- Key: CLOUDSTACK-5512 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5512 Project: CloudStack Issue Type: Bug Security Level: Public(Anyone can view this level - this is the default.) Affects Versions: 4.0.0, 4.1.0, 4.2.0 Reporter: Marcus Sorensen Assignee: Rohit Yadav Fix For: 4.4.0 Template name checking currently just looks at the very end of the url string. e.g.: private void checkFormat(String format, String url) { if((!url.toLowerCase().endsWith(vhd)) This breaks functionality such as registering a template via an S3 pre-signed URL, or anything where the file extension is not the last part of the URL. We should at least attempt to parse the URL for filename vs parameters. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CLOUDSTACK-5512) template format name checking is crude and doesn't work with advanced URLs
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14090716#comment-14090716 ] Rohit Yadav commented on CLOUDSTACK-5512: - [~shadowsor] Marcus, can you give example of a S3 pre-signed URL? Do you propose we remove the entire extension checking as one would be passing the template type anyway? Or, any other way you want to propose? Fix would be simple. template format name checking is crude and doesn't work with advanced URLs -- Key: CLOUDSTACK-5512 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5512 Project: CloudStack Issue Type: Bug Security Level: Public(Anyone can view this level - this is the default.) Affects Versions: 4.0.0, 4.1.0, 4.2.0 Reporter: Marcus Sorensen Fix For: 4.4.0 Template name checking currently just looks at the very end of the url string. e.g.: private void checkFormat(String format, String url) { if((!url.toLowerCase().endsWith(vhd)) This breaks functionality such as registering a template via an S3 pre-signed URL, or anything where the file extension is not the last part of the URL. We should at least attempt to parse the URL for filename vs parameters. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CLOUDSTACK-5512) template format name checking is crude and doesn't work with advanced URLs
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14090922#comment-14090922 ] Marcus Sorensen commented on CLOUDSTACK-5512: - Yes, it might look like this: https://marcus.storage.dc-extras.com/image.qcow2?AWSAccessKeyId=UU94DAQ7HH03OC4KYPROExpires=1407514272Signature=0tMvemt0XTHowwTDZEz%2FhaDTBMs%3D The use case for this would be if someone tries to host a VM template on S3, or perhaps a fancy script-generated template where the URL does not end in the right file extension. In the past we have tricked this by just adding format=qcow2 to any URL. In 4.4 we added a 'TemplateUtils' utility that actually looks at the first megabyte during download and validates that it matches the format selected, so this check could be removed, probably. template format name checking is crude and doesn't work with advanced URLs -- Key: CLOUDSTACK-5512 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5512 Project: CloudStack Issue Type: Bug Security Level: Public(Anyone can view this level - this is the default.) Affects Versions: 4.0.0, 4.1.0, 4.2.0 Reporter: Marcus Sorensen Fix For: 4.4.0 Template name checking currently just looks at the very end of the url string. e.g.: private void checkFormat(String format, String url) { if((!url.toLowerCase().endsWith(vhd)) This breaks functionality such as registering a template via an S3 pre-signed URL, or anything where the file extension is not the last part of the URL. We should at least attempt to parse the URL for filename vs parameters. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CLOUDSTACK-5512) template format name checking is crude and doesn't work with advanced URLs
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14090925#comment-14090925 ] Marcus Sorensen commented on CLOUDSTACK-5512: - I should also mention that there are some hosted templates from high profile companies that use the wrong extension (in our view), for example ubuntu hosts vm templates that are qcow2 as '.img' files. template format name checking is crude and doesn't work with advanced URLs -- Key: CLOUDSTACK-5512 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5512 Project: CloudStack Issue Type: Bug Security Level: Public(Anyone can view this level - this is the default.) Affects Versions: 4.0.0, 4.1.0, 4.2.0 Reporter: Marcus Sorensen Fix For: 4.4.0 Template name checking currently just looks at the very end of the url string. e.g.: private void checkFormat(String format, String url) { if((!url.toLowerCase().endsWith(vhd)) This breaks functionality such as registering a template via an S3 pre-signed URL, or anything where the file extension is not the last part of the URL. We should at least attempt to parse the URL for filename vs parameters. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CLOUDSTACK-5512) template format name checking is crude and doesn't work with advanced URLs
[ https://issues.apache.org/jira/browse/CLOUDSTACK-5512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14090969#comment-14090969 ] Rohit Yadav commented on CLOUDSTACK-5512: - I guess we should remove it, because one could simply mock say a vhd by renaming a text file this will still work. In this case we should remove the check totally and dumb down by assuming whatever format the user has chosen when registering. I'll start a discussion thread on ML, just in case anyone has reasons to object to this. template format name checking is crude and doesn't work with advanced URLs -- Key: CLOUDSTACK-5512 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5512 Project: CloudStack Issue Type: Bug Security Level: Public(Anyone can view this level - this is the default.) Affects Versions: 4.0.0, 4.1.0, 4.2.0 Reporter: Marcus Sorensen Fix For: 4.4.0 Template name checking currently just looks at the very end of the url string. e.g.: private void checkFormat(String format, String url) { if((!url.toLowerCase().endsWith(vhd)) This breaks functionality such as registering a template via an S3 pre-signed URL, or anything where the file extension is not the last part of the URL. We should at least attempt to parse the URL for filename vs parameters. -- This message was sent by Atlassian JIRA (v6.2#6252)