From a282f78cff38aa380e00febc23bd9d54f2d09aa7 Mon Sep 17 00:00:00 2001 From: Robin Date: Sun, 24 Sep 2017 23:29:29 +0200 Subject: [PATCH 01/12] Update rules.md (#58) - Change the Page Title to "Server Rules" - Adding a German Text for the Server Rules --- config/rules.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/rules.md b/config/rules.md index 8861b86..15b855e 100644 --- a/config/rules.md +++ b/config/rules.md @@ -1,4 +1,8 @@ -### Regulamin serwera +### Server Rules + +In dieser Datei werden die Server Regeln eingetragen welche dann auf der Seite "rules.php" angezeigt werden. Zum Ändern muss einfach die Datei rules.md im Verzeichnis config verändert werden. + +
This is a dedicated file to keep your server rules. Its loaded and displayed on "rules.php" page. To change it, go to the config directory and edit file rules.md From bb09f72ee636b212024447890c9f6f4e5733986c Mon Sep 17 00:00:00 2001 From: Wruczek Date: Mon, 25 Sep 2017 00:39:02 +0200 Subject: [PATCH 02/12] Using htmlspecialchars instead of htmlentities to prevent XSS --- bans.php | 6 +++--- include/adminlist.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bans.php b/bans.php index 6c33a4c..1f4ffdc 100644 --- a/bans.php +++ b/bans.php @@ -68,14 +68,14 @@ function getBanlist() { $user = censorIP((string)$ban['ip']); if (!empty($ban['lastnickname'])) - $user = htmlentities((string)$ban['lastnickname']); + $user = htmlspecialchars((string)$ban['lastnickname']); if (empty($user)) $user = "Unknown"; - $reason = htmlentities((string)$ban['reason']); - $invokername = htmlentities((string)$ban['invokername']); + $reason = htmlspecialchars((string)$ban['reason']); + $invokername = htmlspecialchars((string)$ban['invokername']); $duration = $ban['duration']; $createdepoch = $ban['created']; $expiresepoch = $ban['created'] + $duration; diff --git a/include/adminlist.php b/include/adminlist.php index ebf2faf..3c7d882 100644 --- a/include/adminlist.php +++ b/include/adminlist.php @@ -63,11 +63,11 @@ function getAdminList() { if($user["client_type"]) continue; if (!$user) { - $offlineClients[] = '

' . htmlentities($userInfo['client_nickname']) . '' . translate($lang["adminlist"]["status"]["offline"]) . '

'; + $offlineClients[] = '

' . htmlspecialchars($userInfo['client_nickname']) . '' . translate($lang["adminlist"]["status"]["offline"]) . '

'; continue; } - $onlineClients[] = '

User status' . '' . htmlentities($user) . '' . ($user['client_away'] ? '' . translate($lang["adminlist"]["status"]["away"]) . '' : '' . translate($lang["adminlist"]["status"]["online"]) . '') . '

'; + $onlineClients[] = '

User status' . '' . htmlspecialchars($user) . '' . ($user['client_away'] ? '' . translate($lang["adminlist"]["status"]["away"]) . '' : '' . translate($lang["adminlist"]["status"]["online"]) . '') . '

'; } foreach (array_merge($onlineClients, $offlineClients) as $str) From fc2580e78b12270672e40f92a59102507a55e720 Mon Sep 17 00:00:00 2001 From: Oliwier Thomas Date: Wed, 18 Oct 2017 17:43:14 +0200 Subject: [PATCH 03/12] Small grammar fixes --- config/languages/lang.de.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/languages/lang.de.php b/config/languages/lang.de.php index 030ed98..6eeb713 100644 --- a/config/languages/lang.de.php +++ b/config/languages/lang.de.php @@ -33,7 +33,7 @@ $lang["footer"]["background"] = "Hintergrund"; /************* Server status *************/ $lang["serverstatus"]["title"] = "Server Status"; -$lang["serverstatus"]["address"] = "Addresse"; +$lang["serverstatus"]["address"] = "Adresse"; $lang["serverstatus"]["loading"] = "Laden..."; $lang["serverstatus"]["online"] = "Online"; From f65ca923177c12845bf11092c3e8938a3c6bdd32 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 18 Oct 2017 20:39:07 +0200 Subject: [PATCH 04/12] Added Sublime Text Files to gitignore --- .gitignore | 157 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 126 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 596842b..1eda48c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,34 +5,23 @@ admin/ cache/ !/cache/.htaccess -# PhpStorm -.idea/ -*.iws -.idea_modules/ - -# Created by https://www.gitignore.io/api/windows,osx,linux - -### Windows ### -# Windows image file caches -Thumbs.db -ehthumbs.db +# Created by https://www.gitignore.io/api/osx,linux,windows,phpstorm,sublimetext -# Folder config file -Desktop.ini +### Linux ### +*~ -# Recycle Bin used on file shares -$RECYCLE.BIN/ +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* -# Windows Installer files -*.cab -*.msi -*.msm -*.msp +# KDE directory preferences +.directory -# Windows shortcuts -*.lnk +# Linux trash folder which might appear on any partition or disk +.Trash-* +# .nfs files are created when an open file is removed but is still being accessed +.nfs* ### OSX ### *.DS_Store @@ -42,7 +31,6 @@ $RECYCLE.BIN/ # Icon must end with two \r Icon - # Thumbnails ._* @@ -62,15 +50,122 @@ Network Trash Folder Temporary Items .apdisk +### PhpStorm ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 -### Linux ### -*~ +# User-specific stuff: +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/dictionaries -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* +# Sensitive or high-churn files: +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.xml +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml -# KDE directory preferences -.directory +# Gradle: +.idea/**/gradle.xml +.idea/**/libraries -# Linux trash folder which might appear on any partition or disk -.Trash-* +# CMake +cmake-build-debug/ + +# Mongo Explorer plugin: +.idea/**/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Ruby plugin and RubyMine +/.rakeTasks + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +### PhpStorm Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +.idea/sonarlint + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.gitignore.io/api/osx,linux,windows,phpstorm,sublimetext From 59472c34e992e068e2356431395b59d9c7690ba0 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 18 Oct 2017 20:41:11 +0200 Subject: [PATCH 05/12] Small grammar fixes for German language --- config/languages/lang.de.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/languages/lang.de.php b/config/languages/lang.de.php index 6eeb713..c94d2ce 100644 --- a/config/languages/lang.de.php +++ b/config/languages/lang.de.php @@ -57,7 +57,7 @@ $lang["adminlist"]["lastupdate"] = "Letzte Aktualisierung: {0}"; /************* Server viewer promo box (under adminlist and contact) *************/ $lang["svpb"]["title"] = "Server Viewer"; -$lang["svpb"]["takealook"] = "Riskier 'n Blick »"; +$lang["svpb"]["takealook"] = "Riskier einen Blick »"; /************************************/ @@ -101,4 +101,4 @@ $lang["banlist"]["table"]["expires"] = "Läuft ab am"; $lang["rules"]["title"] = "Server Regeln"; $lang["rules"]["filenotfound"] = "Error: Die Datei config/rules.md wurde nicht gefunden!"; -$lang["rules"]["readerror"] = "Fehler: nicht genügend Rechte um auf config/rules.md zuzugreifen!"; +$lang["rules"]["readerror"] = "Fehler: Nicht genügend Rechte um auf config/rules.md zuzugreifen!"; From ee07573ca7e9dd83d3240918fd49370b2d7ef96f Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 18 Oct 2017 22:43:58 +0200 Subject: [PATCH 06/12] Added contributors to the copyright notice --- include/footer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/footer.php b/include/footer.php index 87c7f71..ceee11b 100644 --- a/include/footer.php +++ b/include/footer.php @@ -12,7 +12,7 @@
  • - ts-website v 1.4.5 — © Wruczek 2016 - 2017 + ts-website v 1.4.5 — © Wruczek and Contributors 2016 - 2017

    From a3ec48ea1754eee0460f232b65e1934cce1f0849 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 18 Oct 2017 22:44:11 +0200 Subject: [PATCH 07/12] Added contributors to the copyright notice --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 89cef61..483a08a 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,4 @@ -# (c) 2015 - 2017 Wruczek +# (c) 2015 - 2017 Wruczek and Contributors AddDefaultCharset UTF-8 From 83709a542f976654a947b834c5ebc6bc3b03aaad Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 18 Oct 2017 22:44:21 +0200 Subject: [PATCH 08/12] Added contributors to the copyright notice --- include/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/header.php b/include/header.php index 7235690..744b83b 100644 --- a/include/header.php +++ b/include/header.php @@ -16,7 +16,7 @@ $htalink = $config["general"]["enablehta"] ? "" : ".php"; "> - + <?php echo $config["general"]["title"] . $config["general"]["subtitle"]; ?> From 262ccad21ee24f2e8178d6adf921db8bb176faf8 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 18 Oct 2017 22:44:32 +0200 Subject: [PATCH 09/12] Added contributors to the copyright notice --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 9e784d1..b9f4a51 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 - 2017 Wruczek +Copyright (c) 2016 - 2017 Wruczek and Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 9e293b45a9cd495c8f8c37c2ecc3788cb2586d9b Mon Sep 17 00:00:00 2001 From: Bluscream Date: Sun, 22 Oct 2017 21:13:20 +0200 Subject: [PATCH 10/12] Support for heroku (#75) * Create composer.json added composer.json with mbstring for heroku support * Update .gitignore Added heroku's entries to the gitignore file * Update composer.json --- .gitignore | 3 +++ composer.json | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 composer.json diff --git a/.gitignore b/.gitignore index 1eda48c..cd71c5c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ admin/ cache/ !/cache/.htaccess +# Heroku specific entries +vendor/ +.env # Created by https://www.gitignore.io/api/osx,linux,windows,phpstorm,sublimetext diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..d95217d --- /dev/null +++ b/composer.json @@ -0,0 +1,6 @@ +{ + "require" : { + "php" : "^5.5", + "ext-mbstring": "*" + } +} From fccb3d8f337bde98a7efbab0ce0943782974df0b Mon Sep 17 00:00:00 2001 From: Wruczek Date: Sun, 22 Oct 2017 21:18:39 +0200 Subject: [PATCH 11/12] Small css update for non-square icons --- css/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index 75c9e35..60f2f0e 100644 --- a/css/style.css +++ b/css/style.css @@ -31,7 +31,8 @@ p, a { /* Force 16px icon size after TeamSpeak update 3.1.5 */ .ts3_viewer img, .adminlist img { - width: 16px + width: 16px; + height: 16px; } /* ****** */ From 24c321a26fb2c88ebd9f47d8ef9677da1cc19e4f Mon Sep 17 00:00:00 2001 From: Wruczek Date: Sun, 22 Oct 2017 21:27:43 +0200 Subject: [PATCH 12/12] max width / height for teamspeak icons --- css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index 60f2f0e..b1bf810 100644 --- a/css/style.css +++ b/css/style.css @@ -31,8 +31,8 @@ p, a { /* Force 16px icon size after TeamSpeak update 3.1.5 */ .ts3_viewer img, .adminlist img { - width: 16px; - height: 16px; + max-height: 16px; + max-width: 16px } /* ****** */