aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-11 10:36:48 +0100
committerGravatar GitHub <noreply@github.com> 2017-03-11 10:36:48 +0100
commitbe0bcfef7e38f27284ec7b377b342ba389515964 (patch)
tree59d2d5a8e34fcb279a53a2b44fde1e36c888672d /lib/lib_rss.php
parent5f637bd816b7323885bfe1751a1724ee59a822f6 (diff)
parentb34c318f02574b13560731035fd5a4f750aa1e9b (diff)
Merge pull request #1455 from FreshRSS/dev1.6.3
Release 1.6.3
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 560e5b256..4298e90bf 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -69,10 +69,10 @@ function idn_to_puny($url) {
}
function checkUrl($url) {
- if (empty ($url)) {
+ if ($url == '') {
return '';
}
- if (!preg_match ('#^https?://#i', $url)) {
+ if (!preg_match('#^https?://#i', $url)) {
$url = 'http://' . $url;
}
$url = idn_to_puny($url); //PHP bug #53474 IDN
@@ -285,7 +285,7 @@ function uSecString() {
}
function invalidateHttpCache($username = '') {
- if (($username == '') || (!ctype_alnum($username))) {
+ if (!FreshRSS_user_Controller::checkUsername($username)) {
Minz_Session::_param('touch', uTimeString());
$username = Minz_Session::param('currentUser', '_');
}
@@ -299,13 +299,11 @@ function listUsers() {
scandir($base_path),
array('..', '.', '_')
));
-
foreach ($dir_list as $file) {
- if (is_dir(join_path($base_path, $file))) {
+ if ($file[0] !== '.' && is_dir(join_path($base_path, $file)) && file_exists(join_path($base_path, $file, 'config.php'))) {
$final_list[] = $file;
}
}
-
return $final_list;
}