Project

General

Profile

Actions

Backport(バックポート) #2777

closed

Web API の認証エラー時のHTTPレスポンスヘッダーが200となっている

Added by Maki Takahashi almost 13 years ago. Updated almost 13 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Target version:
Start date:
2011-03-26
Due date:
% Done:

100%

Estimated time:

Description

現象

認証が通っていない環境から以下のようなコマンドを叩くと
本来はレスポンスで 401 もしくは 403 のHTTPヘッダが一行目に返ってくるはずが
200 のレスポンスが返ってきている

telnet sns.example.com 80

GET /api.php/feeds/member/1 HTTP/1.1
Host: sns.example.com
HTTP/1.1 200 OK

=== (省略) ===

401 Unauthorized

原因

認証失敗時のHTTPヘッダの一行目の記述がない

修正内容

lib/filter/opAPISecurityFilter.class.php の 51行目にてステータスコード等を出力しているが
ヘッダー出力ではないため、上記の記述を他のヘッダー出力の前に「ヘッダー」出力する


Related issues 1 (0 open1 closed)

Related to OpenPNE 3 - Bug(バグ) #1977: Web API の認証エラー時のHTTPレスポンスヘッダーが200となっているFixed(完了)Maki Takahashi2011-03-26

Actions
Actions #1

Updated by Maki Takahashi almost 13 years ago

  • Status changed from New(新規) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

更新履歴 4bfe59eeec990bb575689bd99b747b60440ed318 で適用されました。

Actions #2

Updated by Kousuke Ebihara almost 13 years ago

  • Status changed from Pending Review(レビュー待ち) to Rejected(差し戻し)

親チケット #1977 に従い、こちらも差し戻します。

Actions #3

Updated by Maki Takahashi almost 13 years ago

  • Status changed from Rejected(差し戻し) to Pending Review(レビュー待ち)

更新履歴 f5b7abde60b613adbd91e408d3fe73a26c4e80c7 で適用されました。

Actions #4

Updated by Kousuke Ebihara almost 13 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70
Actions #5

Updated by Yuma Sakata almost 13 years ago

  • Status changed from Pending Testing(テスト待ち) to Fixed(完了)
  • % Done changed from 70 to 100

テストOKです。

Actions

Also available in: Atom PDF