Fix the open redirect vulnerability
-
Unfortunately www.remarpro.com don’t publish the detailed reason why they close a plugin.
One security vulnerability that this plugin has is an “open redirect” vulnerability – anyone can use a URL on your site to bounce visitors to their site, using the credibility of your site’s URL to get people to visit theirs.
This can be fixed by editing the file
sermon.php
in the plugin:
1. In the functionsb_increase_download_count
, change the line$wpdb->query("UPDATE ".$wpdb->prefix."sb_stuff SET COUNT=COUNT+1 WHERE name='".esc_sql($stuff_name)."'");
by addingreturn
at the front, so that it goesreturn $wpdb->...
2. Find the two places in the same file where there is:header("Location: ".$url);
. Each time on the previous line you will findsb_increase_download_count($file_name)
. Change that toif (sb_increase_download_count($file_name)) {
and then add the closing brace,}
, on the line after theheader("Location: ".$url);
What this does is makes the plugin only issue a redirect to one of your saved sermons, not to any URL than an attacker sends in.As I say, I can’t tell you whether there are other vulnerabilities.
- The topic ‘Fix the open redirect vulnerability’ is closed to new replies.