diff --git a/image_captcha/image_captcha.module b/image_captcha/image_captcha.module index 485510c..5ac4415 100644 --- a/image_captcha/image_captcha.module +++ b/image_captcha/image_captcha.module @@ -229,7 +229,13 @@ function image_captcha_captcha($op, $captcha_type='', $captcha_sid=NULL) { // Generate image source URL (add timestamp to avoid problems with // client side caching: subsequent images of the same CAPTCHA session // have the same URL, but should display a different code). - $img_src = check_url(url("image_captcha/$captcha_sid/" . REQUEST_TIME)); + $options = array( + 'query' => array( + 'ts' => REQUEST_TIME, + 'sid' => $captcha_sid, + ), + ); + $img_src = check_url(url("image_captcha", $options)); list($width, $height) = _image_captcha_image_size($code); // TODO: start using a theming funtion for generating the image markup? $result['form']['captcha_image'] = array( diff --git a/image_captcha/image_captcha.user.inc b/image_captcha/image_captcha.user.inc index 38434f4..2f7f964 100644 --- a/image_captcha/image_captcha.user.inc +++ b/image_captcha/image_captcha.user.inc @@ -11,12 +11,13 @@ /** * Menu callback function that generates the CAPTCHA image. */ -function image_captcha_image($captcha_sid=NULL) { +function image_captcha_image() { // If output buffering is on: discard current content and disable further buffering if (ob_get_level()) { ob_end_clean(); } + $captcha_sid = $_GET['sid']; if (!$captcha_sid) { exit(); }