summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD24
-rw-r--r--error_Valid_CSRF_Token_Required.patch12
3 files changed, 33 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index adc30c1212c4..73aa7339c0a7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = osticket
pkgdesc = A widely-used open source support ticket system.
pkgver = 1.10.4
- pkgrel = 1
+ pkgrel = 2
url = http://www.osticket.com/
install = osticket.install
arch = any
@@ -11,7 +11,9 @@ pkgbase = osticket
depends = php-apache
depends = mariadb
source = https://github.com/osTicket/osTicket/releases/download/v1.10.4/osTicket-v1.10.4.zip
+ source = error_Valid_CSRF_Token_Required.patch
sha256sums = dbfdc0159471b68a3f54898a18504b999bfeb03920551e2fb827a74cc69cd928
+ sha256sums = 8398d7e5ca92508dc06291b44dc75ffb9f09d9850bfc6a13ec9eecfcc434d4c7
pkgname = osticket
diff --git a/PKGBUILD b/PKGBUILD
index 2cc4c1052e57..dadd733e8e6e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,10 @@
+
# Maintainer: Luis Aranguren <pizzaman@hotmail.com>
# Contributor: Sigmund Vestergaard <sigmundv at gmail dot com>
#
pkgname=osticket
pkgver=1.10.4
-pkgrel=1
+pkgrel=2
pkgdesc='A widely-used open source support ticket system.'
arch=('any')
url='http://www.osticket.com/'
@@ -11,17 +12,28 @@ license=('GPL')
depends=('php' 'php-apache' 'mariadb')
makedepends=('unzip')
install="${pkgname}.install"
-source=("https://github.com/osTicket/osTicket/releases/download/v$pkgver/osTicket-v$pkgver.zip")
-sha256sums=('dbfdc0159471b68a3f54898a18504b999bfeb03920551e2fb827a74cc69cd928')
+source=("https://github.com/osTicket/osTicket/releases/download/v$pkgver/osTicket-v$pkgver.zip"
+ "error_Valid_CSRF_Token_Required.patch")
+sha256sums=('dbfdc0159471b68a3f54898a18504b999bfeb03920551e2fb827a74cc69cd928'
+ '8398d7e5ca92508dc06291b44dc75ffb9f09d9850bfc6a13ec9eecfcc434d4c7')
package() {
- install -d ${pkgdir}/usr/share/webapps/osticket
+ cd $srcdir
+
+ # make destination directory
+ install -d ${pkgdir}/usr/share/webapps/${pkgname}
+
+ # unzip into right folder
sleep 1
echo "Extracting files"
sleep 1
- unzip -d ${pkgdir}/usr/share/webapps/osticket "osTicket-v$pkgver"
+ unzip -d ${pkgdir}/usr/share/webapps/${pkgname} "osTicket-v$pkgver"
+
+ # fix issue https://github.com/osTicket/osTicket/issues/4262#issuecomment-386066797 with patch
+ cd ${pkgdir}/usr/share/webapps/${pkgname}/upload
+ patch -Np1 -i "${srcdir}/error_Valid_CSRF_Token_Required.patch"
# fix permissions (probably needs to get included upstream)
find ${pkgdir}/usr/share/webapps/$pkgname -type f -exec chmod 0664 {} \;
- find ${pkgdir}/usr/share/webapps/$pkgname -type d -exec chmod 0775 {} \;
+ find ${pkgdir}/usr/share/webapps/$pkgname -type d -exec chmod 0775 {} \;
}
diff --git a/error_Valid_CSRF_Token_Required.patch b/error_Valid_CSRF_Token_Required.patch
new file mode 100644
index 000000000000..faa691def0bc
--- /dev/null
+++ b/error_Valid_CSRF_Token_Required.patch
@@ -0,0 +1,12 @@
+diff -ura upload/include/class.ostsession.php upload/include/class.ostsession.php
+--- upload/include/class.ostsession.php 2019-01-27 19:01:42.000000000 +1100
++++ upload/include/class.ostsession.php 2019-01-27 19:14:41.000000000 +1100
+@@ -190,6 +190,7 @@
+ }
+ catch (DoesNotExist $e) {
+ $this->data = new SessionData(['session_id' => $id]);
++ $this->data->session_data = "";
+ }
+ catch (OrmException $e) {
+ return false;
+