This is an automated email from the ASF dual-hosted git repository.
papegaaij pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new 204da89eba Correct the documented default of
ResourceSettings#setParentFolderPlaceholder
204da89eba is described below
commit 204da89eba4ec15ab49d2ebd27cafd6a77b56898
Author: Emond Papegaaij <[email protected]>
AuthorDate: Fri Nov 6 20:11:08 2026 +0100
Correct the documented default of
ResourceSettings#setParentFolderPlaceholder
The setter's javadoc still said the placeholder defaults to null, which
has not been true since the default became "::" in 1.5.2. State the
actual default, what it is for, what null does, and that the package
resource guard decides which resources are served.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../org/apache/wicket/settings/ResourceSettings.java | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git
a/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
b/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
index b8966c50a8..97d94a5b42 100644
--- a/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
+++ b/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
@@ -621,13 +621,17 @@ public class ResourceSettings implements
IPropertiesFactoryContext
/**
* Placeholder string for '..' within resource urls (which will be
crippled by the browser and
- * not work anymore). Note that by default the placeholder string is
<code>null</code> and thus
- * will not allow to access parent folders. That is by purpose and for
security reasons (see
- * Wicket-1992). In case you really need it, a good value for
placeholder would e.g. be "$up$".
- * Resources additionally are protected by a
- * {@link org.apache.wicket.markup.html.IPackageResourceGuard
IPackageResourceGuard}
- * implementation such as {@link
org.apache.wicket.markup.html.PackageResourceGuard} which you
- * may use or extend based on your needs.
+ * not work anymore). By default the placeholder string is
<code>::</code>, so a package
+ * resource can be referenced relative to a parent folder of its scope,
for example
+ * {@code new PackageResourceReference(MyPanel.class,
"../common/style.css")}.
+ * Setting it to <code>null</code> disables the placeholder, and such
references no longer
+ * resolve.
+ * <p>
+ * The package of the scope class does not confine which resources a
request can reach. Which
+ * resources are served is decided by the
+ * {@link org.apache.wicket.markup.html.IPackageResourceGuard
IPackageResourceGuard}, such as
+ * the default {@link
org.apache.wicket.markup.html.SecurePackageResourceGuard}, which you may
+ * configure or extend based on your needs.
*
* @see #getParentFolderPlaceholder()
*