Updated: Comment #0

Problem/Motivation

Long user agent strings (for example, some versions of IE8) result in a fatal PDOException and no record is written for the user even though they are in fact logged in. If error reporting is off then the user just sees "The website encountered an unexpected error. Please try again later.", otherwise they see that as well as the PDOException.

Proposed resolution

Truncate the user agent string if it's longer than 255 characters. According to this Stack Overflow post, user agent strings can push 8000 characters, so just increasing the limit doesn't seem like a good solution.

Remaining tasks

Patch needs review.

User interface changes

n/a

API changes

n/a

n/a

CommentFileSizeAuthor
#1 login_history-2110249-1.patch1022 bytesstar-szr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

star-szr’s picture

Status: Active » Needs review
FileSize
1022 bytes

Patch.

  • Commit f47078c on 7.x-1.x by Cottser:
    Issue #2110249 by Cottser: Fixed Long user agent strings result in a...
star-szr’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Assigned: Unassigned » star-szr
Issue summary: View changes
Status: Needs review » Patch (to be ported)

Committed to 7.x, moving to 8.x.

star-szr’s picture

Assigned: star-szr » Unassigned
Status: Patch (to be ported) » Fixed

Committed to 8.x.

  • Commit 1a5328b on 8.x-1.x by Cottser:
    Issue #2110249 by Cottser: Fixed Long user agent strings result in a...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.