Created attachment 919544 [details]
UI allows to upload a .jpg image
Description of problem:
I was trying to upload a template file and I can upload any file, be it a .jpg or .pdf. UI should throw a validation error before uploading. As soon as user browse the file, UI should validate it.
Version-Release number of selected component (if applicable):
sat6 GA snap1
Steps to Reproduce:
1. Go to Provisioning template
2. try to upload a pdf file or jpg file.
I can upload any file like pdf or jpg image. UI should throw an error on uploading such files. May be "Binary files couldn't be uploaded".
The file format needs to be validated before uploading
I'm not sure, I don't see why templates couldn't store binaries files frankly, or on what basis we'd declare which files are binary (contain nulls? Is that the issue). Is this causing a bug somewhere else?
(In reply to Dominic Cleal from comment #2)
> I'm not sure, I don't see why templates couldn't store binaries files
> frankly, or on what basis we'd declare which files are binary (contain
> nulls? Is that the issue). Is this causing a bug somewhere else?
Binary file is just an example. As per my understanding templates are simple text files. So it should not be allowed to upload an image (.jpg) or a pdf file.
Also, the production.log file filled with junk data(special chars) when we upload .pdf and .jpg files, which is a side-effect.
Created attachment 920842 [details]
when we upload a .pdf or .jpg file, the production.log filled with junk data
Ok, that's easily fixable.
Upstream bug component is Provisioning
Upstream bug component is Infrastructure
This doesn't appear to be a problem anymore. I can populate the template editor with a binary file, but I can't upload it. Also there is no binary data in production.log.
Upstream bug marked as "Resolved" with the same notes.
The fix to this bug will be delivered with release 6.3 of Satellite.