Icon repository - block forbidden file types (or give a Validation-error)

Related products: Software Factory

Since TSF 2023.1 we have an Icon Repository, with the following supported file types:

A change in the Icon repository is that we have limited the allowed extensions. First, every extension could be used for an icon. Now, it has been limited to .gif, .jpeg, .jpg, .png, .bmp, and .svg.

 

This week I had an issue with the Universal GUI that some of my Icons weren’t showing up. The request gave an 403 error but no idea why. 
It turned out to be that the icons had an ICO-file type. Works perfectly in Windows, but clearly not in Universal.


It would be nice if is impossible in the SF to upload Icons with a ‘forbidden’ file type (extension whitelist??)  or at least that the Validation will give an error or a warning.

The File storage extension whitelist only works in combination with Indicium, so with the Universal GUI it will automatically be restricted to the allowed extensions. The Windows GUI sadly does not abide to this whitelist. 

You are able to create your own validations that validate this for example. The validation code (Version >= 2023.1) would then be:

insert into validation_msg 
(
model_id,
branch_id,
validation_id,
pk_col_1,
pk_col_2,
pk_col_3,
pk_col_4,
pk_col_5,
pk_col_6,
pk_col_7,
generated,
insert_user,
insert_date_time,
update_user,
update_date_time
)
select
@model_id,
@branch_id,
@validation_id,
@model_id as pk_col_1,
@branch_id as pk_col_2,
icon_id as pk_col_3,
icon as pk_col_4,
null as pk_col_5,
null as pk_col_6,
null as pk_col_7,
1,
dbo.tsf_user(),
sysdatetime(),
dbo.tsf_user(),
sysdatetime()
from icon
where model_id = @model_id
and branch_id = @branch_id
and icon like '%.ico'
and generated_by_control_proc_id is null

 


@PatrickW, do you consider Mark his reaction as a solution to your idea?


NewNeeds feedback

Yes, I have added this validation in our Base project. Thanks.


Needs feedbackCompleted