소스 검색

Prevent email header injection

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1573 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 년 전
부모
커밋
caf9a6a74a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      core/email.class.inc.php

+ 2 - 2
core/email.class.inc.php

@@ -86,8 +86,8 @@ class EMail
 		set_error_handler(array($this, 'mail_error_handler'));
 		$bRes = mail
 		(
-			$this->m_sTo,
-			$this->m_sSubject,
+			str_replace(array("\n", "\r"), ' ', $this->m_sTo), // Prevent header injection
+			str_replace(array("\n", "\r"), ' ', $this->m_sSubject), // Prevent header injection
 			$this->m_sBody,
 			$sHeaders
 		);