openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.ui.core.IconPool -- allows to override sap standard icons

Open SomeStrangeName opened this issue 9 years ago • 2 comments

OpenUI5 version: any

Browser/version (+device/version): any

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible):

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. sap.ui.core.IconPool.addIcon("somename", "undefined", {...})

Just use the string "undefined" as a collection name and you will be able to override the standard icons.

What is the expected result?

According to messages from the library itself it seems not allowed to override icons.

What happens instead?

Any other information? (attach screenshot if possible)

The reason for this is, that somewhere in the IconPool code is only checking if the collection name "is" undefined (meaning of undefined variable) it will "not" check if the collection name is filled with the string value "undefined". Later in the code (IconPool) the collection name is used as a lookup.

SAP standard icons will have the (string key == "undefined") for looking it up. Since the undefined state of a javascript variable will be converted to the string "undefined" this will have the same effect.

So if you plan to prevent overriding the standard icons you should also check for the string "undefined" :) Or just ignore this issue.

SomeStrangeName avatar Feb 19 '17 22:02 SomeStrangeName

Hi @SomeStrangeName , Thank you for your findings. I have created an internal incident: 1770011552 Regards, Diana

Shtilianova avatar Feb 22 '17 10:02 Shtilianova

Hi @SomeStrangeName ,

thank you for reporting the issue. It's solved and the fix is merged into nightly build. We decided not to downport this fix to the released branch since it's a minor issue (but a very important one :)). The fix will be found from version 1.48 and can be consumed from now in nightly build.

Best regards, Jiawei

stopcoder avatar Feb 27 '17 08:02 stopcoder