diff --git a/www/Stikked/Makefile b/www/Stikked/Makefile index d39b3be19d09..420c5bd6fac7 100644 --- a/www/Stikked/Makefile +++ b/www/Stikked/Makefile @@ -1,54 +1,53 @@ # Created by: Dan Langille PORTNAME= Stikked -DISTVERSION= 0.13.0 -PORTREVISION= 2 +DISTVERSION= 0.14.0 CATEGORIES= www MAINTAINER= dvl@FreeBSD.org COMMENT= PHP-based Pastebin, with a simple and easy to use user interface USES= php:web USE_GITHUB= yes GH_ACCOUNT= claudehohl USE_PHP= ctype filter gd pgsql session NO_BUILD= yes NO_ARCH= yes SUB_FILES= pkg-message OPTIONS_MULTI= DB OPTIONS_MULTI_DB= MYSQL PGSQL SQLITE OPTIONS_DEFAULT= PGSQL MYSQL_DESC= Include the PHP shared extension for MySQL PGSQL_DESC= Include the PHP shared extension for PostgreSQL SQLITE_DESC= Include the PHP shared extension for SQLite3 MYSQL_BROKEN= USE_PHP=mysql no longer supported, unclear if USE_PHP=mysqli works .include .if ${PORT_OPTIONS:MMYSQL} #USE_PHP+= mysql .endif .if ${PORT_OPTIONS:MPGSQL} USE_PHP+= pgsql .endif .if ${PORT_OPTIONS:MSQLITE} USE_PHP+= sqlite3 .endif do-install: ${MKDIR} ${STAGEDIR}${ETCDIR} ${MKDIR} ${STAGEDIR}${WWWDIR} (cd ${WRKSRC}/htdocs && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}) ${INSTALL_DATA} ${STAGEDIR}${WWWDIR}/application/config/stikked.php.dist ${STAGEDIR}${ETCDIR}/stikked.php.sample ${LN} -sf ${ETCDIR}/stikked.php ${STAGEDIR}${WWWDIR}/application/config/ .include diff --git a/www/Stikked/distinfo b/www/Stikked/distinfo index d2eed38c5b43..b3a4a3f47a5b 100644 --- a/www/Stikked/distinfo +++ b/www/Stikked/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1538678447 -SHA256 (claudehohl-Stikked-0.13.0_GH0.tar.gz) = bd6695268a899a1d562b0deff1b67e0522f0e0ef818413e392cc182d3aa82566 -SIZE (claudehohl-Stikked-0.13.0_GH0.tar.gz) = 10644340 +TIMESTAMP = 1655555745 +SHA256 (claudehohl-Stikked-0.14.0_GH0.tar.gz) = 50a2540c234484b44dba713553c15f3a96da00cb7067e976e9ad49c3be1eec5a +SIZE (claudehohl-Stikked-0.14.0_GH0.tar.gz) = 10648711 diff --git a/www/Stikked/files/patch-htdocs_application_config_stikked.php.dist b/www/Stikked/files/patch-htdocs_application_config_stikked.php.dist index 85a83cbc508a..aee0c3215950 100644 --- a/www/Stikked/files/patch-htdocs_application_config_stikked.php.dist +++ b/www/Stikked/files/patch-htdocs_application_config_stikked.php.dist @@ -1,22 +1,22 @@ ---- htdocs/application/config/stikked.php.dist.orig 2017-12-13 15:26:05 UTC +--- htdocs/application/config/stikked.php.dist.orig 2019-11-24 16:10:45 UTC +++ htdocs/application/config/stikked.php.dist -@@ -17,6 +17,19 @@ $config['site_name'] = 'Stikked'; +@@ -19,6 +19,19 @@ $config['site_name'] = 'Stikked'; $config['base_url'] = 'https://yourpastebin.com/'; /** + * TruePaste + * + * Should pastes be converted to HTML entities before saving. + * + * Default, for backwards compatibility, is false. + * + * Set to true if you want your paste to be saved as supplied. +*/ + +$config['true_paste'] = true; + + +/** * Database connection * * Credentials for your database diff --git a/www/Stikked/files/patch-htdocs_application_models_Pastes.php b/www/Stikked/files/patch-htdocs_application_models_Pastes.php index b43993574e20..8ab255d8c233 100644 --- a/www/Stikked/files/patch-htdocs_application_models_Pastes.php +++ b/www/Stikked/files/patch-htdocs_application_models_Pastes.php @@ -1,21 +1,21 @@ ---- htdocs/application/models/Pastes.php.orig 2017-12-13 15:21:30 UTC +--- htdocs/application/models/Pastes.php.orig 2022-06-18 12:47:43 UTC +++ htdocs/application/models/Pastes.php -@@ -56,8 +56,16 @@ class Pastes extends CI_Model - { - $data['created'] = time(); +@@ -32,8 +32,16 @@ class Pastes extends CI_Model + { + $data['created'] = time(); + +- //this is SO evil… saving the «raw» data with htmlspecialchars :-( (but I have to leave this, because of backwards-compatibility) +- $data['raw'] = htmlspecialchars($this->_strip_bad_multibyte_chars($this->input->post('code'))); ++ if ($this->config->item('true_paste')) ++ { ++ // save the paste as supplied ++ $data['raw'] = $this->input->post('code'); ++ } ++ else ++ { ++ //this is SO evil… saving the «raw» data with htmlspecialchars :-( (but I have to leave this, because of backwards-compatibility) ++ $data['raw'] = htmlspecialchars($this->_strip_bad_multibyte_chars($this->input->post('code'))); ++ } + $data['lang'] = htmlspecialchars($this->input->post('lang')); + $data['replyto'] = ($this->input->post('reply') === null ? '0' : $this->input->post('reply')); -- //this is SO evil… saving the «raw» data with htmlspecialchars :-( (but I have to leave this, because of backwards-compatibility) -- $data['raw'] = htmlspecialchars($this->_strip_bad_multibyte_chars($this->input->post('code'))); -+ if ($this->config->item('true_paste')) -+ { -+ // save the paste as supplied -+ $data['raw'] = $this->input->post('code'); -+ } -+ else -+ { -+ //this is SO evil… saving the «raw» data with htmlspecialchars :-( (but I have to leave this, because of backwards-compatibility) -+ $data['raw'] = htmlspecialchars($this->_strip_bad_multibyte_chars($this->input->post('code'))); -+ } - $data['lang'] = htmlspecialchars($this->input->post('lang')); - $data['replyto'] = ($this->input->post('reply') === null ? '0' : $this->input->post('reply')); - diff --git a/www/ot-recorder/files/patch-misc.c b/www/ot-recorder/files/patch-misc.c deleted file mode 100644 index 2ae63fd66f07..000000000000 --- a/www/ot-recorder/files/patch-misc.c +++ /dev/null @@ -1,12 +0,0 @@ ---- misc.c.orig 2019-08-01 13:54:47 UTC -+++ misc.c -@@ -62,7 +62,8 @@ void monitorhook(struct udata *userdata, time_t now, c - static UT_string *us = NULL; - - utstring_renew(us); -- utstring_printf(us, "%ld %s\n", now, topic); -+ utstring_printf(us, "%ld %s\n", (long)now, topic); -+ - - snprintf(mpath, sizeof(mpath), "%s/monitor", STORAGEDIR); - safewrite(mpath, UB(us));