+1 to add this RegexAuthorizer contribution in TapestryModule itself. A
reasonable default configuration must be provided. IMHO, any image or CSS
file is most probably to be public, even when in the classpath.
Em Mon, 28 Dec 2009 16:34:55 -0200, Igor Drobiazko
<[email protected]> escreveu:
<[email protected]>I fear I found a release blocker and I'm
going to give a -1 vote but would like to start a discussion first. In my
app I have a lot of classpath resources like images or javascript files.
For
these assets Tapestry generates paths like the following one:
/myapp/assets/app/app-version-symbol/foo/bar/baz.gif
After an upgrade to 5.1.0.6 all the (classpath) images of my app are
blocked. The following contribution is needed. It allows requests to some
static resources which are located inside the subpackages of the root
package.
public void contributeRegexAuthorizer(final Configuration<String> regex,
@Symbol(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM) final
String
appPackageName) {
final String pattern =
"([^/.]+/)*[^/.]+\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif))$";
regex.add("^" + appPackageName.replace(".", "/") + "/" + pattern);
}
I can live with this contribution and would not like to block the
release.
But I fear there too much apps which will be broken after an upgrade to
5.1.0.6. If we don't want to frustrate users we probably should cancel
the
release, add this contribution and create a new release.
What do you think?
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
Coordenador e professor da Especialização em Engenharia de Software com
Ênfase em Java da Faculdade Pitágoras
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Sócio, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]