pipe character in page title leads to broken page
Asked by Michael Stone:

A user created a page with a "\|" character in it. Now if he tries to access the page he gets a blank screen and a 400 code with confluence 6.5.1.

1) What the heck?

2) How can we delete the page?


Answers:
author: Michael Stone
body: For the record, nginx was decoding the encoded request and passing that to confluence. The documentation at <https://confluence.atlassian.com/confkb/how-to-use-nginx-to-proxy-requests-for-confluence-313459790.html> is actually wrong for this case. Per <http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass> if you use a proxy_pass directive with a URI (as in the atlassian doc) nginx will "normalize" the URI and pass it in decoded form. (I tend to think this is a bug in nginx, as the decoded form isn't valid: it should normalize to encoded form.) Per the nginx documentation you need a proxy_pass without a URI to skip this decoding. In my case it was a simple case of changing

proxy_pass http://localhost:8090/

to

proxy_pass http://localhost:8090

If my confluence instance had additional layers in the URI or required rewriting, the solution might be more complicated.

comments: author: Robbin Bonthond
body: that solved it for me also


author: Sebastian Feldmann
body: Thanks, we also ran into that issue.


author: Bill Bailey
body: What form is the URL in, one with /viewpage.action?pageId= or with the page title?

If the later, does it show the pipe character or \&#124;?

Does the page appear in the page tree under the Page Reorder tab of the space tools?

If you can find the page ID, you can build the delete URL as follows:

../pages/removepage.action?pageId=

This page would indicate that the pipe character is now legal, but it might cause issues with browsers:

<https://confluence.atlassian.com/confkb/confluence-page-urls-contain-pageid-instead-of-the-page-title-278692715.html>

I would just avoid these characters all together.

comments: author: Michael Stone
body: The link has the page title with %7C in it, not the page ID. It does show up in the page tree. "Just avoid the character" isn't a great solution unless there's a way to make all the users just know that.


author: Bill Bailey
body: Well having been a Confluence admin for 6 years, users just have to expect that there are some reserved characters. Pipe is one that should never be used in page titles.

You are also unable to view the page? When it fails, does it show the page ID? Have to tried on different OS/browser combinations?

Is there anything in the Confluence logs? That might give you the ID and an error code.


author: Michael Stone
body: Well, having been working with web apps for many years, admins should expect that the app fails before creating the bad page, not after it's already there. :)

I can't view the page. All it does it display a blank screen. Browser developer mode shows that it's returning an empty page with a 400 code. Nothing in the confluence log. I've tried chrome \& firefox with the same result.


author: Bill Bailey
body: I agree it appears to be a bug. What is strange is that there is nothing in the log. Are any drafts showing?

You should/could file a bug as it seems those characters are now supported, BUT if it does not show anything in the logs ...

So blank screen instead of a Confluence screen with error code. Are you behind a proxy such as NGINX? I have seen setting with rewrite rules on proxies that will cause those kind of errors.


author: Michael Stone
body: ah, that's it--something in the proxy. if I port forward directly to the server it works ok. so that's something fixable, thanks.


author: Bill Bailey
body: Yeah, when you said "blank screen," it tipped me off. ;-) A vote would be nice. ;-)


Tags: server