From e5b0e5f76c0695a01d13c55147a8287df8750594 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 6 Sep 2008 08:36:22 +0000 Subject: - Patch #302763 by Dave Reid, Rob Loach: replace time() by ['REQUEST_TIME'] as per Rasmus' suggestion. Removed drupal_referrer() for consistency. --- modules/openid/openid.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/openid/openid.module') diff --git a/modules/openid/openid.module b/modules/openid/openid.module index a62a3e0f4..c44d95a1d 100644 --- a/modules/openid/openid.module +++ b/modules/openid/openid.module @@ -333,7 +333,7 @@ function openid_association($op_endpoint) { module_load_include('inc', 'openid'); // Remove Old Associations: - db_query("DELETE FROM {openid_association} WHERE created + expires_in < %d", time()); + db_query("DELETE FROM {openid_association} WHERE created + expires_in < %d", $_SERVER['REQUEST_TIME']); // Check to see if we have an association for this IdP already $assoc_handle = db_result(db_query("SELECT assoc_handle FROM {openid_association} WHERE idp_endpoint_uri = '%s'", $op_endpoint)); @@ -367,7 +367,7 @@ function openid_association($op_endpoint) { $assoc_response['mac_key'] = base64_encode(_openid_dh_xorsecret($shared, $enc_mac_key)); } db_query("INSERT INTO {openid_association} (idp_endpoint_uri, session_type, assoc_handle, assoc_type, expires_in, mac_key, created) VALUES('%s', '%s', '%s', '%s', %d, '%s', %d)", - $op_endpoint, $assoc_response['session_type'], $assoc_response['assoc_handle'], $assoc_response['assoc_type'], $assoc_response['expires_in'], $assoc_response['mac_key'], time()); + $op_endpoint, $assoc_response['session_type'], $assoc_response['assoc_handle'], $assoc_response['assoc_type'], $assoc_response['expires_in'], $assoc_response['mac_key'], $_SERVER['REQUEST_TIME']); $assoc_handle = $assoc_response['assoc_handle']; } -- cgit v1.2.3