• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision4200ba8a5e5347b49d8c23fc35741e3df6483726 (tree)
Time2014-11-30 09:59:06
Authorhenoheno <henoheno>
Commiterumorigu

Log Message

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

Change Summary

Incremental Difference

--- a/plugin/article.inc.php
+++ b/plugin/article.inc.php
@@ -88,7 +88,7 @@ function plugin_article_action()
8888 $postdata_input = $article . "\n";
8989 $body = '';
9090
91- if (md5(@join('', get_source($post['refer']))) != $post['digest']) {
91+ if (md5(get_source($post['refer'], TRUE, TRUE)) !== $post['digest']) {
9292 $title = $_title_collided;
9393
9494 $body = $_msg_collided . "\n";
--- a/plugin/comment.inc.php
+++ b/plugin/comment.inc.php
@@ -68,7 +68,7 @@ function plugin_comment_action()
6868
6969 $title = $_title_updated;
7070 $body = '';
71- if (md5(@join('', get_source($vars['refer']))) != $vars['digest']) {
71+ if (md5(get_source($vars['refer'], TRUE, TRUE)) !== $vars['digest']) {
7272 $title = $_title_comment_collided;
7373 $body = $_msg_comment_collided . make_pagelink($vars['refer']);
7474 }
--- a/plugin/edit.inc.php
+++ b/plugin/edit.inc.php
@@ -190,7 +190,7 @@ function plugin_edit_write()
190190 // Collision Detection
191191 $oldpagesrc = join('', get_source($page));
192192 $oldpagemd5 = md5($oldpagesrc);
193- if ($digest != $oldpagemd5) {
193+ if ($digest !== $oldpagemd5) {
194194 $vars['digest'] = $oldpagemd5; // Reset
195195
196196 $original = isset($vars['original']) ? $vars['original'] : '';
--- a/plugin/insert.inc.php
+++ b/plugin/insert.inc.php
@@ -36,7 +36,7 @@ function plugin_insert_action()
3636 $postdata_input = $insert . "\n";
3737
3838 $body = '';
39- if (md5(@join('', get_source($vars['refer']))) != $vars['digest']) {
39+ if (md5(get_source($vars['refer'], TRUE, TRUE)) !== $vars['digest']) {
4040 $title = $_title_collided;
4141 $body = $_msg_collided . "\n";
4242
--- a/plugin/memo.inc.php
+++ b/plugin/memo.inc.php
@@ -36,7 +36,7 @@ function plugin_memo_action()
3636 $postdata_input = $memo_body . "\n";
3737
3838 $body = '';
39- if (md5(@join('', get_source($vars['refer']))) != $vars['digest']) {
39+ if (md5(get_source($vars['refer'], TRUE, TRUE)) !== $vars['digest']) {
4040 $title = $_title_collided;
4141 $body = $_msg_collided . "\n";
4242
--- a/plugin/paint.inc.php
+++ b/plugin/paint.inc.php
@@ -256,7 +256,7 @@ function paint_insert_ref($filename)
256256 }
257257
258258 // 更新の衝突を検出
259- if (md5(join('',$postdata_old)) != $vars['digest'])
259+ if (md5(join('',$postdata_old)) !== $vars['digest'])
260260 {
261261 $ret['msg'] = $_paint_messages['msg_title_collided'];
262262 $ret['body'] = $_paint_messages['msg_collided'];
--- a/plugin/pcomment.inc.php
+++ b/plugin/pcomment.inc.php
@@ -209,7 +209,7 @@ function plugin_pcomment_insert()
209209 $count = count($postdata);
210210
211211 $digest = isset($vars['digest']) ? $vars['digest'] : '';
212- if (md5(join('', $postdata)) != $digest) {
212+ if (md5(join('', $postdata)) !== $digest) {
213213 $ret['msg'] = $_pcmt_messages['title_collided'];
214214 $ret['body'] = $_pcmt_messages['msg_collided'];
215215 }
--- a/plugin/vote.inc.php
+++ b/plugin/vote.inc.php
@@ -47,7 +47,7 @@ function plugin_vote_action()
4747 $postdata .= $vote_str;
4848 }
4949
50- if (md5(@join('', get_source($vars['refer']))) != $vars['digest']) {
50+ if (md5(get_source($vars['refer'], TRUE, TRUE)) !== $vars['digest']) {
5151 $title = $_title_collided;
5252
5353 $s_refer = htmlsc($vars['refer']);