/** * Create the temporary file name. * * @param baseName The base to prepend to the file name being created. * @return the name of the File. */ protected String createFilename(final String baseName) { // BUG29007 // return baseName + "_" + getFilecount() + ".tmp"; // imario@apache.org: BUG34976 get rid of maybe reserved and dangerous characters // e.g. to allow replication of http://hostname.org/fileservlet?file=abc.txt final String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_'); return "tmp_" + getFilecount() + "_" + safeBasename; }
/** * Create the temporary file name. * * @param baseName The base to prepend to the file name being created. * @return the name of the File. */ protected String createFilename(final String baseName) { // BUG29007 // return baseName + "_" + getFilecount() + ".tmp"; // imario@apache.org: BUG34976 get rid of maybe reserved and dangerous characters // e.g. to allow replication of http://hostname.org/fileservlet?file=abc.txt final String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_'); return "tmp_" + getFilecount() + "_" + safeBasename; }
/** * Create the temporary file name. * * @param baseName The base to prepend to the file name being created. * @return the name of the File. */ protected String createFilename(final String baseName) { // BUG29007 // return baseName + "_" + getFilecount() + ".tmp"; // imario@apache.org: BUG34976 get rid of maybe reserved and dangerous characters // e.g. to allow replication of http://hostname.org/fileservlet?file=abc.txt final String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_'); return "tmp_" + getFilecount() + "_" + safeBasename; }
/** * Create the temporary file name. * * @param baseName The base to prepend to the file name being created. * @return the name of the File. */ protected String createFilename(final String baseName) { // BUG29007 // return baseName + "_" + getFilecount() + ".tmp"; // imario@apache.org: BUG34976 get rid of maybe reserved and dangerous characters // e.g. to allow replication of http://hostname.org/fileservlet?file=abc.txt final String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_'); return "tmp_" + getFilecount() + "_" + safeBasename; }