-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Special" character issues when using the S3 storage backend #1795
Comments
The AWS documentation regarding object keys is at https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html. |
Not really understanding the AWS documentation. It's obvious that characters like ';' and '&' must be URL-encoded when used in URL. But why shouldn't they be used in object keys? As a first approach, let's be empiric. Wenn requesting PUT on 'http://minio:9000/otobo-bucket-20220524a/OTOBO/Kernel/Config/Files/ZZZZUnitTestAdmin::Package::Upgradetest1181006654200002.pm' then MinIO returns a 403. This needs to be worked around. But first investigate how that works when there is no S3 syncing. Apparently the '::' do not end up in the file written to Kernel/Config/Files . |
A lot of things are wrong in scripts/test/Console/Command/Admin/Package/Upgrade.t .
|
Found that there is not really a need to support fancy characters in the object keys. Adapted the test scripts/test/Storage/S3.t accordingly. But in that test script we should check whether we can store file names that were sanitized by FilenameCleanup. This is important for the article storage. Here is the clean up from ArticleStorageFS.pm:
|
by recreating an instance of Kernel::Config
avoid the caching of the package verification
Using '::' makes no sense in any case as it created confusing in package names, as usually a '::' indicates another directory level in the file system. And trying to use a colon in a MinIO key results in an error, HTTP status code 403.
also fix regex for mtime in the last test
File names were generated by Kernel::System::Main::FilenameCleanUp(). Skipping the test with a '+' in the object key.
Do not reuse the variable @tests. Use Test2::V0 more consistently.
…rade Issue #1795 admin package upgrade
Two findings:
|
Also replace + and # for the S3 type. Use the new type for the S3 article storage. Add test cases.
The code has been adapted. Currently there are no known problems with unsupported characters. Closing this issue. |
When running the test suite with MinIO syncing. #1777, there are some failures that seem to be related to the characters used in the file name. An example is the test _scripts/test/Console/Command/Admin/Package/Upgrade.t _ . There we get the message:
Could not write the key Kernel/Config/Files/ZZZZUnitTestAdmin::Package::Upgradetest3947006996400002.pm to S3 at /opt/otobo/Kernel/System/UnitTest/Helper.pm line 583.
That something fishy is going on can be show in the MinIO Gui. Let's upload a dummy file called ZZZZUnitTestAdmin::Package::Upgradetest3947006996400002.pm and then retrieve it from MinIO. storing it in ../tmp:
The content xxxx is fine. But in the file name :: seems to be replaced ** ** (single space).
Needs to be investigated.
The text was updated successfully, but these errors were encountered: