You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Florian Holeczek <fl...@holeczek.de> on 2008/02/19 10:57:09 UTC

Trying to create a wiki page :-)

Hi all,

while trying to create a wiki page containing the slash character,
I've been running into some weird issues. I've been testing this on
2.6.2-svn-1 running on Tomcat/6.0.14.

It's not making much sense to me, so I'll post this here awaiting some
comments like "sure, that's all fine" or "ugh, that's a bug".

* first try:
  [issue one / two]
  Creates a link to an attachment "issue one / two" of the current
  page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
  Result is a "HTTP Status 404 - Attachment 'Issue one two', version
  -1 does not exist." from Tomcat.
  Weird:
  * Why is this an attachment and not a regular page link?
  * The link appears in blue underlined letters, although it doesn't
    exist.
  * slash in the link (!?), no slash in the error message.

* second try "maybe escape the slash":
  [issue one \/ two]
  Nearly the same again,
  "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
  But this time, the result is a blank page (really blank, no HTML).

* third try "maybe with double slash":
  [issue one // two]
  Same as first try, but of course the double slash is the difference
  in the link.

What remains is the question of how to correctly link to such a wiki
page and whether which characters are allowed and how to be used is
documented somewhere (haven't found anything on this topic).

Regards,
 Florian

Re: Trying to create a wiki page :-)

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Replying just to the -dev list.

Well, the user should not have to care about this.  The only thing  
which is confusing you is that you are trying to make JSPWiki do  
something which it cannot do, and therefore you are seeing odd effects.

The slash check for attachments is just a speed optimization.  You  
should never see the side effects (unless you forcefully try to  
create a page with a slash ;-)

It's one of those "doctor, it hurts when I do this - well, don't do  
it then" -things.

/Janne

On Feb 19, 2008, at 12:35 , Florian Holeczek wrote:

> Ok that's obvious. But the currently implemented logic then seems to
> be "it mustn't be a page, so it's an attachment", which isn't that
> obvious anymore?
>
> Regards,
>  Florian
>
> Ursprüngliche Nachricht vom 19.02.2008 um 11:19:
>
>> That's easy - if you are able to create a page name containing a
>> slash, it is a bug.  Slashes are NOT allowed in page names.
>
>> /Janne
>
>> On 19 Feb 2008, at 11:57, Florian Holeczek wrote:
>
>>> Hi all,
>>>
>>> while trying to create a wiki page containing the slash character,
>>> I've been running into some weird issues. I've been testing this on
>>> 2.6.2-svn-1 running on Tomcat/6.0.14.
>>>
>>> It's not making much sense to me, so I'll post this here awaiting  
>>> some
>>> comments like "sure, that's all fine" or "ugh, that's a bug".
>>>
>>> * first try:
>>>   [issue one / two]
>>>   Creates a link to an attachment "issue one / two" of the current
>>>   page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
>>>   Result is a "HTTP Status 404 - Attachment 'Issue one two', version
>>>   -1 does not exist." from Tomcat.
>>>   Weird:
>>>   * Why is this an attachment and not a regular page link?
>>>   * The link appears in blue underlined letters, although it doesn't
>>>     exist.
>>>   * slash in the link (!?), no slash in the error message.
>>>
>>> * second try "maybe escape the slash":
>>>   [issue one \/ two]
>>>   Nearly the same again,
>>>   "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
>>>   But this time, the result is a blank page (really blank, no HTML).
>>>
>>> * third try "maybe with double slash":
>>>   [issue one // two]
>>>   Same as first try, but of course the double slash is the  
>>> difference
>>>   in the link.
>>>
>>> What remains is the question of how to correctly link to such a wiki
>>> page and whether which characters are allowed and how to be used is
>>> documented somewhere (haven't found anything on this topic).
>>>
>>> Regards,
>>>  Florian


Re: Trying to create a wiki page :-)

Posted by Florian Holeczek <fl...@holeczek.de>.
Ok that's obvious. But the currently implemented logic then seems to
be "it mustn't be a page, so it's an attachment", which isn't that
obvious anymore?

Regards,
 Florian

Ursprüngliche Nachricht vom 19.02.2008 um 11:19:

> That's easy - if you are able to create a page name containing a  
> slash, it is a bug.  Slashes are NOT allowed in page names.

> /Janne

> On 19 Feb 2008, at 11:57, Florian Holeczek wrote:

>> Hi all,
>>
>> while trying to create a wiki page containing the slash character,
>> I've been running into some weird issues. I've been testing this on
>> 2.6.2-svn-1 running on Tomcat/6.0.14.
>>
>> It's not making much sense to me, so I'll post this here awaiting some
>> comments like "sure, that's all fine" or "ugh, that's a bug".
>>
>> * first try:
>>   [issue one / two]
>>   Creates a link to an attachment "issue one / two" of the current
>>   page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
>>   Result is a "HTTP Status 404 - Attachment 'Issue one two', version
>>   -1 does not exist." from Tomcat.
>>   Weird:
>>   * Why is this an attachment and not a regular page link?
>>   * The link appears in blue underlined letters, although it doesn't
>>     exist.
>>   * slash in the link (!?), no slash in the error message.
>>
>> * second try "maybe escape the slash":
>>   [issue one \/ two]
>>   Nearly the same again,
>>   "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
>>   But this time, the result is a blank page (really blank, no HTML).
>>
>> * third try "maybe with double slash":
>>   [issue one // two]
>>   Same as first try, but of course the double slash is the difference
>>   in the link.
>>
>> What remains is the question of how to correctly link to such a wiki
>> page and whether which characters are allowed and how to be used is
>> documented somewhere (haven't found anything on this topic).
>>
>> Regards,
>>  Florian

Re: Trying to create a wiki page :-)

Posted by Florian Holeczek <fl...@holeczek.de>.
Ok that's obvious. But the currently implemented logic then seems to
be "it mustn't be a page, so it's an attachment", which isn't that
obvious anymore?

Regards,
 Florian

Ursprüngliche Nachricht vom 19.02.2008 um 11:19:

> That's easy - if you are able to create a page name containing a  
> slash, it is a bug.  Slashes are NOT allowed in page names.

> /Janne

> On 19 Feb 2008, at 11:57, Florian Holeczek wrote:

>> Hi all,
>>
>> while trying to create a wiki page containing the slash character,
>> I've been running into some weird issues. I've been testing this on
>> 2.6.2-svn-1 running on Tomcat/6.0.14.
>>
>> It's not making much sense to me, so I'll post this here awaiting some
>> comments like "sure, that's all fine" or "ugh, that's a bug".
>>
>> * first try:
>>   [issue one / two]
>>   Creates a link to an attachment "issue one / two" of the current
>>   page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
>>   Result is a "HTTP Status 404 - Attachment 'Issue one two', version
>>   -1 does not exist." from Tomcat.
>>   Weird:
>>   * Why is this an attachment and not a regular page link?
>>   * The link appears in blue underlined letters, although it doesn't
>>     exist.
>>   * slash in the link (!?), no slash in the error message.
>>
>> * second try "maybe escape the slash":
>>   [issue one \/ two]
>>   Nearly the same again,
>>   "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
>>   But this time, the result is a blank page (really blank, no HTML).
>>
>> * third try "maybe with double slash":
>>   [issue one // two]
>>   Same as first try, but of course the double slash is the difference
>>   in the link.
>>
>> What remains is the question of how to correctly link to such a wiki
>> page and whether which characters are allowed and how to be used is
>> documented somewhere (haven't found anything on this topic).
>>
>> Regards,
>>  Florian

Re: Trying to create a wiki page :-)

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> Slashes are not allowed, ok. Then why aren't they simply ignored, so
> that the result would be a link to a _page_ named "issue one two"?

Because it's interpreted as an attachment, as a speed optimization.

> No explanation for this one...

*shrug* could be CSS issue.

/Janne

Re: Trying to create a wiki page :-)

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> Slashes are not allowed, ok. Then why aren't they simply ignored, so
> that the result would be a link to a _page_ named "issue one two"?

Because it's interpreted as an attachment, as a speed optimization.

> No explanation for this one...

*shrug* could be CSS issue.

/Janne

Re: Trying to create a wiki page :-)

Posted by Florian Holeczek <fl...@holeczek.de>.
> That's easy - if you are able to create a page name containing a
> slash, it is a bug.  Slashes are NOT allowed in page names.

In particular:

>> * first try:
>>   [issue one / two]
>>   Creates a link to an attachment "issue one / two" of the current
>>   page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
>>   Result is a "HTTP Status 404 - Attachment 'Issue one two', version
>>   -1 does not exist." from Tomcat.
>>   Weird:
>>   * Why is this an attachment and not a regular page link?

Have a look at the error message: JSPWiki is searching for an
attachment "Issue one two".

Slashes are not allowed, ok. Then why aren't they simply ignored, so
that the result would be a link to a _page_ named "issue one two"?

>>   * The link appears in blue underlined letters, although it doesn't
>>     exist.

No explanation for this one...

>> * second try "maybe escape the slash":
>>   [issue one \/ two]
>>   Nearly the same again,
>>   "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
>>   But this time, the result is a blank page (really blank, no HTML).

... and this one.

Regards,
 Florian

Re: Trying to create a wiki page :-)

Posted by Florian Holeczek <fl...@holeczek.de>.
> That's easy - if you are able to create a page name containing a
> slash, it is a bug.  Slashes are NOT allowed in page names.

In particular:

>> * first try:
>>   [issue one / two]
>>   Creates a link to an attachment "issue one / two" of the current
>>   page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
>>   Result is a "HTTP Status 404 - Attachment 'Issue one two', version
>>   -1 does not exist." from Tomcat.
>>   Weird:
>>   * Why is this an attachment and not a regular page link?

Have a look at the error message: JSPWiki is searching for an
attachment "Issue one two".

Slashes are not allowed, ok. Then why aren't they simply ignored, so
that the result would be a link to a _page_ named "issue one two"?

>>   * The link appears in blue underlined letters, although it doesn't
>>     exist.

No explanation for this one...

>> * second try "maybe escape the slash":
>>   [issue one \/ two]
>>   Nearly the same again,
>>   "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
>>   But this time, the result is a blank page (really blank, no HTML).

... and this one.

Regards,
 Florian

Re: Trying to create a wiki page :-)

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
That's easy - if you are able to create a page name containing a  
slash, it is a bug.  Slashes are NOT allowed in page names.

/Janne

On 19 Feb 2008, at 11:57, Florian Holeczek wrote:

> Hi all,
>
> while trying to create a wiki page containing the slash character,
> I've been running into some weird issues. I've been testing this on
> 2.6.2-svn-1 running on Tomcat/6.0.14.
>
> It's not making much sense to me, so I'll post this here awaiting some
> comments like "sure, that's all fine" or "ugh, that's a bug".
>
> * first try:
>   [issue one / two]
>   Creates a link to an attachment "issue one / two" of the current
>   page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
>   Result is a "HTTP Status 404 - Attachment 'Issue one two', version
>   -1 does not exist." from Tomcat.
>   Weird:
>   * Why is this an attachment and not a regular page link?
>   * The link appears in blue underlined letters, although it doesn't
>     exist.
>   * slash in the link (!?), no slash in the error message.
>
> * second try "maybe escape the slash":
>   [issue one \/ two]
>   Nearly the same again,
>   "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
>   But this time, the result is a blank page (really blank, no HTML).
>
> * third try "maybe with double slash":
>   [issue one // two]
>   Same as first try, but of course the double slash is the difference
>   in the link.
>
> What remains is the question of how to correctly link to such a wiki
> page and whether which characters are allowed and how to be used is
> documented somewhere (haven't found anything on this topic).
>
> Regards,
>  Florian


Re: Trying to create a wiki page :-)

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
That's easy - if you are able to create a page name containing a  
slash, it is a bug.  Slashes are NOT allowed in page names.

/Janne

On 19 Feb 2008, at 11:57, Florian Holeczek wrote:

> Hi all,
>
> while trying to create a wiki page containing the slash character,
> I've been running into some weird issues. I've been testing this on
> 2.6.2-svn-1 running on Tomcat/6.0.14.
>
> It's not making much sense to me, so I'll post this here awaiting some
> comments like "sure, that's all fine" or "ugh, that's a bug".
>
> * first try:
>   [issue one / two]
>   Creates a link to an attachment "issue one / two" of the current
>   page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
>   Result is a "HTTP Status 404 - Attachment 'Issue one two', version
>   -1 does not exist." from Tomcat.
>   Weird:
>   * Why is this an attachment and not a regular page link?
>   * The link appears in blue underlined letters, although it doesn't
>     exist.
>   * slash in the link (!?), no slash in the error message.
>
> * second try "maybe escape the slash":
>   [issue one \/ two]
>   Nearly the same again,
>   "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
>   But this time, the result is a blank page (really blank, no HTML).
>
> * third try "maybe with double slash":
>   [issue one // two]
>   Same as first try, but of course the double slash is the difference
>   in the link.
>
> What remains is the question of how to correctly link to such a wiki
> page and whether which characters are allowed and how to be used is
> documented somewhere (haven't found anything on this topic).
>
> Regards,
>  Florian


Re: Trying to create a wiki page :-)

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> I am suggesting that "/<space>" be allowed within page names (which  
> would satisfy my customer and your) BUT this will probably seen as  
> a "kludge".

Yes.  Definitely.

In 3.0, it's our intent to allow full subpages, so no space kludges,  
please.

> The position "punctuation is a nest of security holes" is not  
> sustainable in front of users needs: chemical names are filled with  
> punctuation but they are names so they must be allowed as a Wiki  
> page name.

The question is - for how many people it is a security hole and how  
many people need chemical names?  I mean, it's pretty trivial for you  
to go and compile your own version with your own  
MarkupParser.PUNCTUATION_CHARS_ALLOWED.

Also, we'd like to store some punctuation chars for further possible  
use.  Just in case we want to extend the markup...

/Janne

RE: Trying to create a wiki page :-)

Posted by Christophe Dupriez <ch...@poisoncentre.be>.
Dear Florian,

You may have seen a long message I wrote one week ago while trying to use page names with punctuation. I hope the community may support an open discussion on this issue.

"/" is currently used to separate page name from attachment name.

I am suggesting that "/<space>" be allowed within page names (which would satisfy my customer and your) BUT this will probably seen as a "kludge".

A central place to define and explain the constraints about punctuation would be nice but a discussion is needed first to clarify.

The position "punctuation is a nest of security holes" is not sustainable in front of users needs: chemical names are filled with punctuation but they are names so they must be allowed as a Wiki page name.

Have a nice day!

Christophe

-----Original Message-----
From: Florian Holeczek [mailto:florian@holeczek.de] 
Sent: mardi 19 février 2008 10:57
To: jspwiki-user@incubator.apache.org;jspwiki-dev@incubator.apache.org
Subject: Trying to create a wiki page :-)

Hi all,

while trying to create a wiki page containing the slash character,
I've been running into some weird issues. I've been testing this on
2.6.2-svn-1 running on Tomcat/6.0.14.

It's not making much sense to me, so I'll post this here awaiting some
comments like "sure, that's all fine" or "ugh, that's a bug".

* first try:
  [issue one / two]
  Creates a link to an attachment "issue one / two" of the current
  page (http://localhost:8080/jspwiki/attach/issue%20one%20/%20two).
  Result is a "HTTP Status 404 - Attachment 'Issue one two', version
  -1 does not exist." from Tomcat.
  Weird:
  * Why is this an attachment and not a regular page link?
  * The link appears in blue underlined letters, although it doesn't
    exist.
  * slash in the link (!?), no slash in the error message.

* second try "maybe escape the slash":
  [issue one \/ two]
  Nearly the same again,
  "http://localhost:8080/jspwiki/attach/issue%20one%20%5C/%20two".
  But this time, the result is a blank page (really blank, no HTML).

* third try "maybe with double slash":
  [issue one // two]
  Same as first try, but of course the double slash is the difference
  in the link.

What remains is the question of how to correctly link to such a wiki
page and whether which characters are allowed and how to be used is
documented somewhere (haven't found anything on this topic).

Regards,
 Florian
?
m