Page MenuHomePhabricator

A very long title causes a false "network error" in search
Closed, ResolvedPublic

Description


Version: Android (alpha)
Severity: normal

Details

Reference
bz65560

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:09 AM
bzimport set Reference to bz65560.
bzimport added a subscriber: Unknown Object (MLST).

I have a hard time reproducing this. Would you provide an example? I've created https://test.wikipedia.org/wiki/1234567890123456789012345678901234567890123456789012345678901234567890, which has a title of 70 characters but that seems to be working. How long is the title you've tried? Thanks!

(In reply to Bernd Sitzmann from comment #1)

I have a hard time reproducing this. Would you provide an example? I've
created
https://test.wikipedia.org/wiki/
1234567890123456789012345678901234567890123456789012345678901234567890,
which has a title of 70 characters but that seems to be working. How long is
the title you've tried? Thanks!

There are even longer ones already live on the site, such as [[Another Demonstration of the Cliff-Guibert Fire Hose Reel, Showing a Young Girl Coming from an Office, Detaching Hose, Running with It 60 Feet, and Playing a Stream, All Inside of 30 Seconds]] which is 190 characters long. That page works in the app for me, so I'm not sure what's causing this crash.

I created the long title by typing some characters then repeating "select all - copy - paste - paste - paste" several times. I guess it is some "network" / http error: 414 Request-URI Too Large.

To resolve this, very long, if not all, queries should be POSTed.

This also causes "Could not reach the network :(" when I try to Go directly.

Change 134749 had a related patch set uploaded by BearND:
Restrict length of search input to 255

https://gerrit.wikimedia.org/r/134749

(In reply to Dan Garry from comment #2)

(In reply to Bernd Sitzmann from comment #1)

I have a hard time reproducing this. Would you provide an example? I've
created
https://test.wikipedia.org/wiki/
1234567890123456789012345678901234567890123456789012345678901234567890,
which has a title of 70 characters but that seems to be working. How long is
the title you've tried? Thanks!

There are even longer ones already live on the site, such as [[Another
Demonstration of the Cliff-Guibert Fire Hose Reel, Showing a Young Girl
Coming from an Office, Detaching Hose, Running with It 60 Feet, and Playing
a Stream, All Inside of 30 Seconds]] which is 190 characters long. That page
works in the app for me, so I'm not sure what's causing this crash.

Dan, the problem doesn't occur when one just accepts the search suggestion. One has to type a ton of characters into the search field. Anyways, my patch should restrict prevent this now, since I'm restricting the length of the field to 255 characters, the same amount the server allows.

See also discussion with liangent on IRC today

got something like {"info":"Prefix search request was longer longer than the maximum allowed length. (2304 > 255)","code":"request_too_long"} from opensearch api before.

Change 134749 merged by jenkins-bot:
Restrict length of search input to 255

https://gerrit.wikimedia.org/r/134749