%dirpath() is not working after 1.2020.10

0 votes
asked Jan 10, 2021 in Bug by anonymous
Seems that build in function %dirpath() is not returning current path anymore in the latest plantuml.jar versions. Last working version is 1.2020.10. Problem noticed in a Windows 10 environment.

@startuml
!$ver = %version()
!log version is $ver
!$dirp = %dirpath()
!log dirpath is $dirp
@enduml

1 Answer

0 votes
answered Jan 11, 2021 by plantuml (295,000 points)

Starting with version 1.2020.11, we fix some security issues in PlantUML (see https://plantuml.com/security )

In some occasions, it turns out that %dirpath() exposes too many info about the running server.

In your case, you have to set PLANTUML_SECURITY_PROFILE to UNSECURE to let %dirpath() working.

Tell us if it help !

commented Jan 12, 2021 by anonymous
Yes, it helps. Thank you.

Maybe some short note about this in guide, would be good to have also.
...