security error trying to reuse an input control

0

tl;dr: I am trying to reuse an input control that relies on another input control and get a security error when I try to.

I have a series of reports that in our existing site use a single form, since the filters for the report are the same. Several of the filters are based on a parameter that will be passed into the report, which is effectively the identifier for the domain that is calling the report. It is a security feature that we filter this information by the domain. For the sake of demonstration, I'll call this parameter p_siteid. It is used in the queries embedded in the admin's definition of the input control.

I set up and tested the first report, creating several input controls that rely on p_siteid. Eventually, I realized that there were some organizational issues in the tree, so I created a folder named "relies on p_siteid" and I moved all of the input controls that rely on p_siteid into it. Magic happened, everything was fine, yay. Then I realized that there was an additional organizational problem in the tree and I created a folder for the set of reports that I was working on. I moved the report into that folder, magic happened, everything worked, yay.

Then I tried to create the second report. I saved the .jrxml as a new file name. The I went to the jasper admin to set up the report. I did the first setup page, uploading the second .jrxml file. On the input controls page, I added a control for p_siteid. Then I tried to add the first of the input controls that relies on p_siteid. I got the following error:

An error has occurred. Please contact your system administrator. (5321)

It works to reuse an input control from the original folder that doesn't rely on p_siteid.

I searched for this error message and found that this is a security error and that I should check the logs. The logs say:

2013-03-27 13:10:26,364 ERROR Validator,http-8080-2:408 - [SECURITY FAILURE context=inputControlPath-Create_AdHoc_InputControl_context, key=inputControlPath, type(URLNoProtocol)=^[\p{L}\p{M}\p{N}\p{Pd}\p{Pc}\p{Po}\p{Pi}\p{Pf}\:\/\%\.\s]*$, input=/organizations/organization_1/datatypes/Input_Controls/dependent_on_p_siteid/p_location_id_list, maxLength=100, isBlacklist=false]

I really don't know how to read this message and I don't know how to fix or get around this security error. I should be able to reuse the input controls or there's really no reason for them to exist outside of an individual report. Perhaps I need to create p_siteid as an input control that's in the tree instead of having individual p_siteid setup in the reports. It just seems silly to have a reusable input control for a hidden text box.

Does anyone know how I can fix or get around this?

Thanks!

jlarkin_1's picture
Joined: Mar 8 2013 - 3:29pm
Last seen: 6 years 4 months ago
The first set of input controls that threw the security error had a query embedded in the input control definition and that query relied on the site_id parameter. So I decided to try another way: I set up the query for the input controls and then assigned the query in the input control definition. Same result.
jlarkin_1 - 6 years 4 months ago
Now I've reused the site_id parameter and the query used to set up the other location select box. When I tried to use them. I get a hidden error that site_id is missing and it's defaulting to null, resulting in no locations populating despite site_id existing and having a value. So I deleted site_id and created one local to the report, same result. So I deleted the location selector and rebuilt it, same result. So basically, what I've learned is that in JasperReports, the iFrame interface, and input control reuse are mutually exclusive for all inputs that are more complicated than a text box or calendar. Wonderful.
jlarkin_1 - 6 years 4 months ago
Now I've copied the input and pasted it into another directory. Same result.
jlarkin_1 - 6 years 4 months ago
show 1 more...

same here :-( ... I ...

  • set up a datasource (works since imported from Studio, in this case pointing to the JR metadata db itself)
  • referenced by a set up query
  • referenced by some set up control element
  • to-be-referenced by some report as a selectable parameter, but crashes with the above error
andreasX - 5 years 6 months ago

0 Answers:

No answers yet
Feedback