Ignore:
Timestamp:
Oct 17, 2016, 12:29:18 PM (6 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2031: Import function stops with blank page

Seems like the redirect URL to the new dialog was not generated correctly. Encoding is needed on all string parameters. Don't know why the production server is not affected. Maybe Apache is fixing things...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/common/import/index.jsp

    r6192 r7201  
    157157        "&cmd=NewJob&pluginconfiguration_id="+pluginConfigurationId+
    158158        "&plugindefinition_id="+pluginDefinitionId+
    159         "&title="+request.getParameter("title")+
     159        "&title="+HTML.urlEncode(request.getParameter("title"))+
    160160        "&job_name="+HTML.urlEncode(request.getParameter("job_name"))+
    161161        "&job_description="+HTML.urlEncode(request.getParameter("job_description"))+
    162162        "&item_type="+context.getItem().name()+
    163         "&subcontext="+subContext+
     163        "&subcontext="+HTML.urlEncode(subContext)+
    164164        "&context_type="+context.getType().name()+
    165165        "&warnIfOpen=0";
     
    194194      forward = "no_fileformat.jsp?ID="+ID+
    195195        "&file_id="+f.getId()+
    196         "&title="+request.getParameter("title")+
     196        "&title="+HTML.urlEncode(request.getParameter("title"))+
    197197        "&job_name="+HTML.urlEncode(request.getParameter("job_name"))+
    198198        "&job_description="+HTML.urlEncode(request.getParameter("job_description"))+
    199199        "&item_type="+context.getItem().name()+
    200         "&subcontext="+subContext+
     200        "&subcontext="+HTML.urlEncode(subContext)+
    201201        "&context_type="+context.getType().name();
    202202      //throw new WebException("popup", "Import failed", "Couldn't find any file format matching file {1}", f);
     
    225225            (pc == null ? "" : "&pluginconfiguration_id="+ pc.getId()) +
    226226            "&plugindefinition_id="+plugin.getId()+
    227             "&title="+request.getParameter("title")+
     227            "&title="+HTML.urlEncode(request.getParameter("title"))+
    228228            "&job_name="+HTML.urlEncode(request.getParameter("job_name"))+
    229229            "&job_description="+HTML.urlEncode(request.getParameter("job_description"))+
    230230            "&item_type="+context.getItem().name()+
    231             "&subcontext="+subContext+
     231            "&subcontext="+HTML.urlEncode(subContext)+
    232232            "&context_type="+context.getType().name()+
    233233            "&parameter:" + Parameters.CHARSET_PARAMETER + "=" + HTML.urlEncode(charset) +
Note: See TracChangeset for help on using the changeset viewer.