| @@ -288,8 +288,9 @@ | ||
| 288 | 288 | |
| 289 | 289 | public function authFailedResp() { |
| 290 | 290 | $api_public_key = WPRAccount::getApiPublicKey($this->settings); |
| 291 | 291 | $default_secret = WPRRecover::getDefaultSecret($this->settings); |
| 292 | + $default_account_pubkey = WPRAccount::getDefaultPublicKey(); | |
| 292 | 293 | $bvinfo = new WPRInfo($this->settings); |
| 293 | 294 | $resp = array( |
| 294 | 295 | "request_info" => $this->info(), |
| 295 | 296 | "bvinfo" => $bvinfo->info(), |
| @@ -294,10 +295,15 @@ | ||
| 294 | 295 | "request_info" => $this->info(), |
| 295 | 296 | "bvinfo" => $bvinfo->info(), |
| 296 | 297 | "statusmsg" => "FAILED_AUTH", |
| 297 | 298 | "api_pubkey" => substr($api_public_key, 0, 8), |
| 299 | + "def_key_status" => WPRRecover::getSecretStatus($this->settings), | |
| 298 | 300 | "def_sigmatch" => substr(hash('sha1', $this->method.$default_secret.$this->time.$this->version), 0, 8) |
| 299 | 301 | ); |
| 302 | + | |
| 303 | + if (is_string($default_account_pubkey) && strlen($default_account_pubkey) >= 32) { | |
| 304 | + $resp["default_account_pubkey"] = substr($default_account_pubkey, 0, 8); | |
| 305 | + } | |
| 300 | 306 | |
| 301 | 307 | if ($this->account) { |
| 302 | 308 | $resp["account_info"] = $this->account->info(); |
| 303 | 309 | $resp["sigmatch"] = substr(hash('sha1', $this->method.$this->account->secret.$this->time.$this->version), 0, 6); |