ZK Jasper report viewer prints incorrect file

Description

The jasper report viewer ZkJRViewer renders a PDF file to disk, and then displays in the control. This temporary file is created using the pattern "yyyyMMddHHmmss". Therefore, if 2 users print the same report, in different clients, at exactly the same second, then the user who printed the first report, is presented with the report from the second client.

I have initially set the priority as major, because it is a security risk, and problem is hard to diagnose.

Environment

None

Activity

Show:
Carlos Ruiz
October 15, 2014, 7:29 PM

Just adding an idea, what if we add a couple of sysconfig keys:

  • "FileUtil.getTempMailName.suffix" where we can fill something like "@#AD_User_ID@"

  • "FileUtil.getTempMailName.dateformat" where we can fill something like "yyyyMMddHHmmss"

Neil G
October 16, 2014, 7:48 AM

Sounds good - although it would also need to cater for the same user logged into multiple sessions.

  • "FileUtil.getTempMailName.suffix" where we can fill something like "@#AD_User_ID@" --> Also include the session ID, or maybe just the session ID on its own.

Otherwise, use a stream for previewing, and save to disk when the email button is pressed, using the sysconfig settings mentioned above.

Neil G
October 17, 2014, 7:50 AM

Also a suggestion to add a warning in the sysconfig description regarding uniqueness and concurrency.

Carlos Ruiz
April 22, 2015, 6:50 PM

Thanks , followed better your advice, just added #AD_Session_ID

Neil G
April 23, 2015, 11:13 AM

Sounds good. Thanks Carlos.

Assignee

Carlos Ruiz

Reporter

Neil G

Labels

None

Tested By

None

Components

Affects versions

Priority

Major
Configure