Bug #657

[PATCH] ip field too short when using IPv6

Added by typo-toke-bluesky-inka-de - 971 days ago. Updated 871 days ago.

Status :Closed Start :
Priority :Normal Due date :
Assigned to :tobi - % Done :

0%

Category :backend
Target version :-
Resolution :

fixed


Description

Trying to comment an Article when using a IPv6-Capable Webserver will lead to an SQL-Error.

PGError: ERROR: value too long for type character varying(15) : INSERT INTO comments ("body_html", "updated_at", "body", "title", "author", "url", "ip", "article_id", "created_at", "email") VALUES('Hmm, nicht wirklich hübsch.... TEST, TEST', '2006-02-18 00:43:04', 'Hmm, nicht wirklich hübsch.... TEST, TEST', NULL, 'Toke', _, '::ffff:192.168.62.30', 5, '2006-02-15 00:27:26', _)

An IPv6-Address is maximum 8*4+7 Chars long when printed.

Associated revisions

Revision 870
Added by scott 959 days ago

Spam RBL update. Closes #657

History

02/18/2006 12:40 AM - typo-toke-bluesky-inka-de -

Setting the Size of the ip varchar row to 39 Chars will fix that issue.

02/26/2006 04:58 AM - steve-longdo-gmail-com -

Attaching a migration to definitively set the size.

03/03/2006 12:07 AM - pdcawley -

  • Status changed from New to Closed
  • Resolution set to fixed

Thanks, applied (in r873)

Also available in: Atom PDF