Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

pipe character in page title leads to broken page

Michael Stone December 30, 2017

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?

2 answers

2 votes
Michael Stone December 30, 2017

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.

Robbin Bonthond
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2018

that solved it for me also

Sebastian Feldmann April 26, 2019

Thanks, we also ran into that issue.

1 vote
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 30, 2017

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 |?

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.

Michael Stone December 30, 2017

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.

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 30, 2017

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.

Michael Stone December 30, 2017

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.

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 30, 2017

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.

Michael Stone December 30, 2017

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.

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 30, 2017

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events