You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/06/08 10:33:43 UTC
svn commit: r412705 -
/lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java
Author: andreas
Date: Thu Jun 8 01:33:43 2006
New Revision: 412705
URL: http://svn.apache.org/viewvc?rev=412705&view=rev
Log:
Asset upload: When errors occur, remove the value of the 'file' parameter. The value can't be passed to the next screen for security reasons, so the user has to be prompted to choose the asset again.
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java?rev=412705&r1=412704&r2=412705&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java Thu Jun 8 01:33:43 2006
@@ -52,11 +52,20 @@
addErrorMessage("Please enter the rights.");
}
+ /*
+ * The <input type="file"/> value cannot be passed to the next screen because
+ * the browser doesn't allow this for security reasons.
+ */
+
+ if (hasErrors()) {
+ deleteParameter("file");
+ }
+
Part file = getPart("file");
if (file == null) {
addErrorMessage("Please choose a file to upload.");
}
-
+
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org