You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2024/12/06 10:03:02 UTC
(ofbiz-framework) branch release24.09 updated: Fixed: Secure the uploads (OFBIZ-12080)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 222d88920c Fixed: Secure the uploads (OFBIZ-12080)
222d88920c is described below
commit 222d88920c1f8bdc0d87f360718de94876c0b4dd
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Fri Dec 6 10:34:11 2024 +0100
Fixed: Secure the uploads (OFBIZ-12080)
For the same reason I explained to Danny trunk, this renames upload_file_type
to up_load_file_type
---
.../ofbiz/product/catalog/category/EditCategory.groovy | 2 +-
.../catalog/config/EditProductConfigItemContent.groovy | 2 +-
.../ofbiz/product/catalog/imagemanagement/ImageUpload.groovy | 2 +-
.../ofbiz/product/catalog/product/EditProductContent.groovy | 2 +-
applications/product/template/category/EditCategory.ftl | 8 ++++----
.../product/template/config/EditProductConfigItemContent.ftl | 2 +-
applications/product/template/product/EditProductContent.ftl | 12 ++++++------
7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/category/EditCategory.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/category/EditCategory.groovy
index f69a1be2f0..d204f9f491 100644
--- a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/category/EditCategory.groovy
+++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/category/EditCategory.groovy
@@ -56,7 +56,7 @@ context.imageNameLinkTwo = imageUrlPrefix + '/' + filenameExpander.expandString(
forLock = new Object()
contentType = null
-fileType = request.getParameter('upload_file_type')
+fileType = request.getParameter('up_load_file_type')
if (fileType) {
context.fileType = fileType
diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/config/EditProductConfigItemContent.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/config/EditProductConfigItemContent.groovy
index b4f4a00f6d..bf19db8cfd 100644
--- a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/config/EditProductConfigItemContent.groovy
+++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/config/EditProductConfigItemContent.groovy
@@ -69,7 +69,7 @@ context.tryEntity = tryEntity
forLock = new Object()
contentType = null
-fileType = request.getParameter('upload_file_type')
+fileType = request.getParameter('up_load_file_type')
if (fileType) {
context.fileType = fileType
diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/imagemanagement/ImageUpload.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/imagemanagement/ImageUpload.groovy
index 4dd8e3131f..dcb2b14257 100644
--- a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/imagemanagement/ImageUpload.groovy
+++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/imagemanagement/ImageUpload.groovy
@@ -69,7 +69,7 @@ context.tryEntity = tryEntity
// UPLOADING STUFF
forLock = new Object()
contentType = null
-String fileType = request.getParameter('upload_file_type')
+String fileType = request.getParameter('up_load_file_type')
if (fileType) {
context.fileType = fileType
diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/product/EditProductContent.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/product/EditProductContent.groovy
index 8e8f041332..7832b55a2f 100644
--- a/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/product/EditProductContent.groovy
+++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/catalog/product/EditProductContent.groovy
@@ -69,7 +69,7 @@ context.tryEntity = tryEntity
// UPLOADING STUFF
forLock = new Object()
contentType = null
-String fileType = request.getParameter('upload_file_type')
+String fileType = request.getParameter('up_load_file_type')
if (fileType) {
context.fileType = fileType
diff --git a/applications/product/template/category/EditCategory.ftl b/applications/product/template/category/EditCategory.ftl
index e09f9c68cc..35375b14fe 100644
--- a/applications/product/template/category/EditCategory.ftl
+++ b/applications/product/template/category/EditCategory.ftl
@@ -213,15 +213,15 @@ function insertImageName(type,nameValue) {
<h3>${uiLabelMap.ProductCategoryUploadImage}</h3>
</div>
<div class="screenlet-body">
- <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" name="imageUploadForm">
+ <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" name="imageUploadForm">
<table cellspacing="0" class="basic-table">
<tr><td>
<input type="file" size="50" name="fname" accept=".png,.gif,.jpg,.jpeg,.tiff,.tif"/>
<br />
<span>
- <label><input type="radio" name="up_load_file_type_bogus" value="category" checked="checked" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductCategoryImageUrl}</label>
- <label><input type="radio" name="up_load_file_type_bogus" value="linkOne" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductLinkOneImageUrl}</label>
- <label><input type="radio" name="up_load_file_type_bogus" value="linkTwo"onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductLinkTwoImageUrl}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="category" checked="checked" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductCategoryImageUrl}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="linkOne" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductLinkOneImageUrl}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="linkTwo"onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductLinkTwoImageUrl}</label>
</span>
<input type="submit" class="smallSubmit" value="${uiLabelMap.ProductUploadImage}"/>
</td></tr>
diff --git a/applications/product/template/config/EditProductConfigItemContent.ftl b/applications/product/template/config/EditProductConfigItemContent.ftl
index 9567438126..ed2cfc6fa3 100644
--- a/applications/product/template/config/EditProductConfigItemContent.ftl
+++ b/applications/product/template/config/EditProductConfigItemContent.ftl
@@ -152,7 +152,7 @@ function insertImageName(size,nameValue) {
<h3>${uiLabelMap.ProductUploadImage}</h3>
</div>
<div class="screenlet-body">
- <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" name="imageUploadForm">
+ <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" name="imageUploadForm">
<input type="file" size="50" name="fname" accept=".png,.gif,.jpg,.jpeg,.tiff,.tif"/>
<input type="submit" class="smallSubmit" value="${uiLabelMap.ProductUploadImage}" />
</form>
diff --git a/applications/product/template/product/EditProductContent.ftl b/applications/product/template/product/EditProductContent.ftl
index a9e136362d..ea642e57be 100644
--- a/applications/product/template/product/EditProductContent.ftl
+++ b/applications/product/template/product/EditProductContent.ftl
@@ -184,7 +184,7 @@ under the License.
};
</script>
<h3>${uiLabelMap.ProductUploadImage}</h3>
- <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" name="imageUploadForm">
+ <form method="post" enctype="multipart/form-data" action="<@o...@ofbizUrl>" name="imageUploadForm">
<table cellspacing="0" class="basic-table">
<tr>
<td width="20%" align="right" valign="top">
@@ -192,11 +192,11 @@ under the License.
</td>
<td> </td>
<td width="80%" colspan="4" valign="top">
- <label><input type="radio" name="up_load_file_type_bogus" value="small" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonSmall}</label>
- <label><input type="radio" name="up_load_file_type_bogus" value="medium" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonMedium}</label>
- <label><input type="radio" name="up_load_file_type_bogus" value="large"onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonLarge}</label>
- <label><input type="radio" name="up_load_file_type_bogus" value="detail" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonDetail}</label>
- <label><input type="radio" name="up_load_file_type_bogus" value="original" checked="checked" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductOriginal}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="small" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonSmall}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="medium" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonMedium}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="large"onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonLarge}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="detail" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.CommonDetail}</label>
+ <label><input type="radio" name="up_load_file_type_bogus" value="original" checked="checked" onclick='setUploadUrl("<@o...@ofbizUrl>");'/>${uiLabelMap.ProductOriginal}</label>
<input type="submit" class="smallSubmit" value="${uiLabelMap.ProductUploadImage}"/>
</td>
</tr>