Jump to content
We've recently updated our Privacy Statement, available here ×
  • Restrict Import of JAR files From Add Resources - File Context Menu


    asimkin
    • Features: JasperReports Server Version: v7.5, v7.2 Product: JasperReports® Server

    Question

    Customer has a requirement to restrict import of *.jar files from Add Resources > File > Secure file context menu in the repository .


    Solution

    TIBCO JasperReports® Server uses file extension validation for each resource type, defined in a JavaScript file resource.add.files.js located in jasperserver-proscriptsruntime_dependenciesjrs-uisrc for v.7.2.0 jasperserver-proscriptsruntime_dependenciesjrs-uisrcresource for v.7.5.0 typetoExtMap object: typeToExtMap: { 'accessGrantSchema': ['xml'], 'css': ['css'], 'font': ['ttf'], 'img': ['jpg', 'jpeg', 'gif', 'bmp', 'png'], 'jar': ['jar'], 'jrxml': ['jrxml'], 'olapMondrianSchema': ['xml'], 'prop': ['properties'], 'jrtx': ['jrtx'], 'xml': ['xml', 'agxml'], 'config': ['config'], 'cer': ['p12', 'pfx'], 'contentResource': ['docx', 'doc', 'ppt', 'pptx', 'xls', 'xlsx', 'ods', 'odt', 'odp', 'pdf', 'rtf', 'html', 'txt', 'csv', 'json'], 'secureFile': ['*'] }

    For secure file, uploading files with any extensions allowed: "secureFile": ["*"]

    You can change the property value to specify a comma separated list of valid extensions for secure file.

    As TIBCO JasperReports® Server uses optimized version of scripts, you should rebuild the scripts as described in Ultimate Guide:

    https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v710/customizing-javascript-files

    or add _opt=false parameter to the URL to use non-optimized scripts:

    Why my JavaScript customized solution does not work? 

    Solution tested with TIBCO JasperReports® Server v.7.2.0 , 7.5


    AS-20200228, case 01805477


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...