• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscapheguic翻訳omegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revisionb2c32c79df97a09f00d1b8203e02121085c6b6b9 (tree)
Time2014-11-30 20:25:42
Authorhenoheno <henoheno>
Commiterumorigu

Log Message

BugTrack2/236: If you compare two numerical strings, they are compared as integers

Change Summary

Incremental Difference

--- a/plugin/attach.inc.php
+++ b/plugin/attach.inc.php
@@ -617,7 +617,7 @@ EOD;
617617 if (PLUGIN_ATTACH_DELETE_ADMIN_ONLY || $this->age) {
618618 return attach_info('err_adminpass');
619619 } else if (PLUGIN_ATTACH_PASSWORD_REQUIRE &&
620- md5($pass) != $this->status['pass']) {
620+ md5($pass) !== $this->status['pass']) {
621621 return attach_info('err_password');
622622 }
623623 }
@@ -669,7 +669,7 @@ EOD;
669669 if (PLUGIN_ATTACH_DELETE_ADMIN_ONLY || $this->age) {
670670 return attach_info('err_adminpass');
671671 } else if (PLUGIN_ATTACH_PASSWORD_REQUIRE &&
672- md5($pass) != $this->status['pass']) {
672+ md5($pass) !== $this->status['pass']) {
673673 return attach_info('err_password');
674674 }
675675 }
--- a/plugin/pcomment.inc.php
+++ b/plugin/pcomment.inc.php
@@ -230,7 +230,7 @@ function plugin_pcomment_insert()
230230 while ($end_position < $count) {
231231 $matches = array();
232232 if (preg_match('/^(\-{1,2})(?!\-)(.*)$/', $postdata[$end_position++], $matches)
233- && md5($matches[2]) == $reply_hash)
233+ && md5($matches[2]) === $reply_hash)
234234 {
235235 $b_reply = TRUE;
236236 $level = strlen($matches[1]) + 1;