Skip to content

Commit

Permalink
keep cookies file outside of webtree to reduce possibility of data-sc…
Browse files Browse the repository at this point in the history
…raping
  • Loading branch information
thylacine committed May 26, 2018
1 parent 618dabc commit 995e233
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fof-main.php
Expand Up @@ -848,12 +848,12 @@ function fof_parse($url)
$pie->set_feed_url($url);

// do we have a cookie file?
if ( is_readable ( $cookiestxt = dirname(__FILE__) . '/cookies.txt' ) ) {
$pie->set_curl_options(array(
CURLOPT_COOKIEFILE => $cookiestxt,
CURLOPT_COOKIEJAR => $cookiestxt
) );
}
if ( is_readable ( $cookiestxt = (defined('FOF_DATA_PATH') ? FOF_DATA_PATH : dirname(__FILE__)) . '/cookies.txt' ) ) {
$pie->set_curl_options(array(
CURLOPT_COOKIEFILE => $cookiestxt,
CURLOPT_COOKIEJAR => $cookiestxt
) );
}

$pie->init();

Expand Down

0 comments on commit 995e233

Please sign in to comment.