Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

세션 시작시 이상한 점 하나. #936

Closed
kijin opened this issue Aug 27, 2014 · 1 comment
Closed

세션 시작시 이상한 점 하나. #936

kijin opened this issue Aug 27, 2014 · 1 comment
Labels
Milestone

Comments

@kijin
Copy link
Contributor

kijin commented Aug 27, 2014

현재 버전의 Context.class.php를 보면 324~328줄에 아래와 같은 코드가 있습니다.

session_start();
if($sess = $_POST[session_name()])
{
    session_id($sess);
}

이거 이상하지 않나요?

  1. 공식 매뉴얼에 따르면 session_id() 함수는 반드시 session_start() 함수보다 먼저 사용해야 합니다. 세션이 이미 시작된 후에 사용할 경우 아무런 효과도 없습니다.
  2. 만약 효과가 있다면 CSRF를 통한 session fixation 공격에 노출될 수 있으므로 오히려 더 큰 문제가 될 수 있습니다.

커밋 히스토리를 뒤져보니 2011년에 파일 업로드 관련 디버깅을 위해 추가된 코드 같습니다. 플래시 일부 버전의 버그 때문에 파일 업로드시 세션 쿠키가 제대로 전달되지 않던 시절이죠. 그러나 그 때도 이 코드가 정상 작동했는지는 의문입니다. 위에 말씀드린 것처럼 세션이 이미 시작된 후에는 아무 효과도 없거든요.

코어 개발자님들의 점검을 부탁드립니다.

@ghost ghost self-assigned this Aug 28, 2014
@ghost ghost added this to the 1.7.6 milestone Sep 3, 2014
@ghost ghost added the type/bug label Sep 4, 2014
@ghost
Copy link

ghost commented Sep 11, 2014

56567bb

@ghost ghost closed this as completed Sep 11, 2014
ghost pushed a commit that referenced this issue Sep 17, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant