Bug 45057 - Detection of SVG image type in umc/widgets/Image is not entirely correct
Detection of SVG image type in umc/widgets/Image is not entirely correct
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-24 13:11 CEST by Alexander Kläser
Modified: 2020-06-22 16:09 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, Design, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2017-07-24 13:11:08 CEST
The following change needs to be applied in order to match SVG images starting with "<xml" or "<XML" correctly:

> --- a/management/univention-web/js/widgets/Image.js
> +++ b/management/univention-web/js/widgets/Image.js
> @@ -71,7 +71,7 @@ define([
>                         }
>                         // check whether file starts with '<svg', '<SVG', '<xml', or '<XML'...
>                         // as simple check that should work for most cases
> -                       if (this.value.indexOf('PHN2Z') === 0 || this.value.indexOf('PFNWR') === 0 || this.value.indexOf('PFhNT') || this.value.indexOf('PHhtb')) {
> +                       if (this.value.indexOf('PHN2Z') === 0 || this.value.indexOf('PFNWR') === 0 || this.value.indexOf('PFhNT') === 0 || this.value.indexOf('PHhtb') === 0) {
>                                 return 'svg+xml';
>                         }
>                        return 'unknown';