| @@ -113,18 +113,8 @@ | ||
| 113 | 113 | return $this->wpdb->prefix . $table; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | - * Get escaped table name for use in SQL queries | |
| 118 | - * | |
| 119 | - * @param string $table Full table name. | |
| 120 | - * @return string Escaped table name with backticks. | |
| 121 | - */ | |
| 122 | - private function esc_table( $table ) { | |
| 123 | - return '`' . esc_sql( $table ) . '`'; | |
| 124 | - } | |
| 125 | - | |
| 126 | - /** | |
| 127 | 117 | * Get activity log table name |
| 128 | 118 | * |
| 129 | 119 | * @return string |
| 130 | 120 | */ |
| @@ -1186,10 +1176,15 @@ | ||
| 1186 | 1176 | 'code' => $code, |
| 1187 | 1177 | 'expires_at' => $expires_at, |
| 1188 | 1178 | 'attempts' => 0, |
| 1189 | 1179 | 'used' => 0, |
| 1180 | + // In UTC, like expires_at. Left to the column default it was the | |
| 1181 | + // MySQL server's local time, and the resend limit compares it with | |
| 1182 | + // time(): on servers behind UTC it never held, and ahead of UTC it | |
| 1183 | + // refused a legitimate resend for hours (rule 19, 2.11.8). | |
| 1184 | + 'created_at' => current_time( 'mysql', true ), | |
| 1190 | 1185 | ), |
| 1191 | - array( '%d', '%s', '%s', '%d', '%d' ) | |
| 1186 | + array( '%d', '%s', '%s', '%d', '%d', '%s' ) | |
| 1192 | 1187 | ); |
| 1193 | 1188 | |
| 1194 | 1189 | return $result ? $this->wpdb->insert_id : false; |
| 1195 | 1190 | } |