Created
July 16, 2013 18:25
-
-
Save dai1741/6011256 to your computer and use it in GitHub Desktop.
A dirty and insecure patch for kk-star-ratings 1.x.
When using it with PHP 5.3, a warning message from php such like 'Deprecated: Function set_magic_quotes_runtime() ...' is injected into ajax response of kk-ratings.js. This ignores it by checking existence of returned contents directly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/kk-star-ratings/js/kk-ratings.js 2012-05-08 21:00:16.000000000 +0900 | |
+++ b/kk-star-ratings/js/kk-ratings.js 2013-07-17 02:04:01.539796700 +0900 | |
@@ -93,7 +93,7 @@ | |
msg = msg.replace(/^\s+|\s+$/g,""); | |
var response = msg.split('|||'); | |
- if(response[0]=='SUCCESS') | |
+ if(response[1]!='') | |
{ | |
var per = response[1]; | |
var legend = response[2]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment