Bug #4155

Apache (with mod_rewrite?) returns Forbidden error if permalink slug is more than 255 characters

Added by David Juhasz over 8 years ago. Updated over 7 years ago.

Status:VerifiedStart date:
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Routing
Target version:Release 1.3
Google Code Legacy ID:atom-2207 Tested version:
Sponsored: Requires documentation:

Description

To reproduce this error: ========================
1)Create an information object with a title that is longer than 255 characters
2)Click to view the object

Resulting error: ================
Apache "Forbidden" error

Expected result: ================
Returns the requested resource

[g] Legacy categories: Routing


Related issues

Related to Access to Memory (AtoM) - Bug #4709: very long slug causes server error New 02/20/2013
Related to Access to Memory (AtoM) - Bug #5068: Application error trying to link a digital object to a de... Invalid 05/10/2013

History

#1 Updated by David Juhasz over 8 years ago

See this explanation of the problem:
http://serverfault.com/questions/120397/max-length-of-url-257-characters-for-mod-rewrite

Easiest solution is probably to truncate slugs to 240-245 characters to allow for ";isdiah", ";isad" standards suffixes and possible increment numbers ("-2", "-3") for duplicate slugs.

#2 Updated by David Juhasz over 8 years ago

We will also need to retroactively shorten existing slugs via the migration script from vesrsion 1.2 and earlier.

#3 Updated by Anonymous over 8 years ago

- Missing comment -

#4 Updated by Mike Cantelon over 8 years ago

Added logic to truncate slugs to 235 characters.

#5 Updated by David Juhasz over 8 years ago

  • Status changed from New to In progress

Fixed in r11021.

Still need to add a migration for existing sites.

#6 Updated by David Juhasz over 8 years ago

  • Status changed from In progress to QA/Review

Actually, truncating existing slugs in a migration script is a bad idea. If a long slug is working in a previous version of the app, it should still work in Release 1.3, and we should avoid changing slugs whenever possible because they are used to provide "permanent" URLs.

Marking issue for QA-review.

[g] New owner:

#7 Updated by Anonymous about 8 years ago

  • Status changed from QA/Review to Verified

Title is truncated. No error is returned.

#8 Updated by Redmine Admin over 7 years ago

  • Category set to Routing

Also available in: Atom PDF