Reviewing merge request #1202: Prevents redirect URLs that have canonical URLs longer than 255 chars from b...

Prevents redirect URLs that have canonical URLs longer than 255 chars from being written to the database as their canonical. Redirecting URLs will instead be saved to the database as given.

The reason for this is that table 'file' column 'url' is a VARCHAR(255) in MySQL and it silently truncates URLs longer than 255 characters, breaking the url.

The proper fix for this is to improve this column, making its type TEXT, but there are no database changes for 0.8.x, so this is the next best thing for data integrity. A migration script for 0.9.x could be written to audit the database checking for redirects and updating these urls to their proper canonical url.

Commits that would be merged:

Version 1
  • Version 1
  • 2260cf2
  • 85e264c
  • Prevents redirect URLs that have canonical URLs longer than 255 chars from being written to the database as their canonical. Redirecting URLs will instead be saved to the database as given.

Showing 2260cf2-85e264c

Comments

→ State changed from Open to Merged

was discussed on mailing list previously. Thanks for doing this work.

Add a new comment:

Login or create an account to post a comment

How to apply this merge request to your repository