Advertisement
Guest User

sermonbrowser admin.php patch

a guest
Jun 9th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. diff --git sb-includes/admin.php sb-includes/admin.php
  2. index aeab8e8..ef6e960 100644
  3. --- sb-includes/admin.php
  4. +++ sb-includes/admin.php
  5. @@ -794,7 +794,9 @@ function sb_files() {
  6. $valid_url = false;
  7. if(ini_get('allow_url_fopen')) {
  8. $headers = array_change_key_case(get_headers($url, 1),CASE_LOWER);
  9. - if ($headers[0] == 'HTTP/1.1 200 OK') {
  10. + $matches = array();
  11. + $matched = preg_match('#HTTP/\d+\.\d+ (\d+)#', $headers[0], $matches);
  12. + if ($matched && $matches[1] == '200') {
  13. if ($_POST['import_type'] == 'download') {
  14. $filename = substr($url, strrpos ($url, '/')+1);
  15. $filename = substr($filename, 0, strrpos ($filename, '?'));
  16. @@ -2579,4 +2581,4 @@ function sb_add_contextual_help($help) {
  17. $out.= '</p></div>';
  18. return $out;
  19. }
  20. -?>
  21. \ No newline at end of file
  22. +?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement