From 302f49baf2acc23e6ea5da9778eeb18ad97c444c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 8 Nov 2018 10:12:33 +0100 Subject: provide a function to log to syslog --- include/text.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 15cc0ca8a..076c98407 100644 --- a/include/text.php +++ b/include/text.php @@ -633,6 +633,19 @@ function attribute_contains($attr, $s) { return false; } +/** + * @brief Log to syslog + * + * @param string $msg Message to log + * @param int $priority - compatible with syslog + */ +function hz_syslog($msg, $priority = LOG_INFO) { + openlog("hz-log", LOG_PID | LOG_PERROR, LOG_LOCAL0); + syslog($priority, $msg); + closelog(); +} + + /** * @brief Logging function for Hubzilla. * -- cgit v1.2.3 From 35e66770be6ca93c9090cdab221e6c33a410a569 Mon Sep 17 00:00:00 2001 From: "DM42.Net (Matt Dent)" Date: Tue, 13 Nov 2018 17:20:21 -0500 Subject: Filter search box before display --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 076c98407..da18080dd 100644 --- a/include/text.php +++ b/include/text.php @@ -1075,7 +1075,7 @@ function micropro($contact, $redirect = false, $class = '', $mode = false) { function search($s,$id='search-box',$url='/search',$save = false) { return replace_macros(get_markup_template('searchbox.tpl'),array( - '$s' => $s, + '$s' => htmlspecialchars($s), '$id' => $id, '$action_url' => z_root() . $url, '$search_label' => t('Search'), -- cgit v1.2.3