From fa7f30a0cf600f9822854a839171e0dc65717f38 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 7 Mar 2011 13:25:34 +0000 Subject: [PATCH] SimpleSAML_Utilities::redirect: Log warning when URL exceeds 2048 bytes. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2754 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Utilities.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index 19bbfbd40..e0feecd40 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -526,6 +526,10 @@ class SimpleSAML_Utilities { $code = 302; } + if (strlen($url) > 2048) { + SimpleSAML_Logger::warning('Redirecting to URL longer than 2048 bytes.'); + } + /* Set the location header. */ header('Location: ' . $url, TRUE, $code); -- GitLab