Skip to main content
Completed

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

Related products:Software Factory
  • Erwin Ekkel
  • PatrickW

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.

Did this topic help you find an answer to your question?

5 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23

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

 


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9

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


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
NewNeeds feedback

Forum|alt.badge.img+3
  • Author
  • 54 replies
  • December 5, 2023

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


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
Needs feedbackCompleted

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings