selfpaste is a small self hosting paste service.
-Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/
\ No newline at end of file
+# Third party resources
+Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/
+UAC image from: https://doomwiki.org/wiki/File:UAC_insignia.png
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<browserconfig>
+ <msapplication>
+ <tile>
+ <square150x150logo src="mstile-150x150.png"/>
+ <TileColor>#da532c</TileColor>
+ </tile>
+ </msapplication>
+</browserconfig>
# check request
$_urlToParse = filter_var($_SERVER['QUERY_STRING'],FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
if(!empty($_urlToParse)) {
- # see http://de2.php.net/manual/en/regexp.reference.unicode.php
if(preg_match('/[\p{C}\p{M}\p{Sc}\p{Sk}\p{So}\p{Zl}\p{Zp}]/u',$_urlToParse) === 1) {
die('Malformed request. Make sure you know what you are doing.');
}
# static helper class
require 'lib/summoner.class.php';
+$_short = false;
if(isset($_GET['s']) && !empty($_GET['s'])) {
$_short = trim($_GET['s']);
- $_short = Summoner::validate($_short,'nospace') ? $_short : "";
+ $_short = Summoner::validate($_short,'nospace') ? $_short : false;
}
-# header information
-header('Content-type: text/html; charset=UTF-8');
+$contentType = 'Content-type: text/html; charset=UTF-8';
+$contentBody = 'welcome';
+
+if(!empty($_short)) {
+
+}
-var_dump($_SERVER);
\ No newline at end of file
+# header information
+header($contentType);
+if(file_exists('view/'.$contentBody.'.inc.php')) {
+ require_once 'view/'.$contentBody.'.inc.php';
+}
+else {
+ error_log('Content body file missing. '.var_export($_SERVER,true),3,'./logs/error.log');
+ http_response_code(400);
+ die('Well, something went wrong...');
+}
\ No newline at end of file
--- /dev/null
+<svg version="1" xmlns="http://www.w3.org/2000/svg" width="333.333" height="333.333" viewBox="0 0 250.000000 250.000000"><path d="M101.4 39.1L89.5 58h-9.1c-8.9 0-10.4.5-10.4 3.6 0 .2 3.6.4 8 .4 7.8 0 8 .1 7 2-.9 1.8-2.1 2-9.8 2l-8.7.1-9.2 15.8L48 97.8V117.5l-7.5 11.2c-6.3 9.5-7.5 11.9-7.5 15.4 0 3.6-1.7 7.1-12.7 24.8-6.9 11.3-12.6 21.1-12.6 21.6 0 .6 2.6 5.5 5.8 10.8l5.7 9.7h16.3c14.9 0 16.3.2 18 2 1.6 1.8 3.1 2 15.9 2h14.2l6.9 7 6.9 7h7.4c6.5 0 7.4-.2 7.9-2 .5-1.9 1.4-2 13.3-2s12.8.1 13.3 2c.4 1.8 1.3 2 7.4 2l6.8-.1 7.2-6.9 7.3-7h14.2c13.2 0 14.4-.2 15.6-2 1.1-1.9 2.3-2 18-2h16.7l5.8-9.8c3.1-5.4 5.7-10.2 5.7-10.6 0-.4-5.9-10.4-13.1-22.2-11.6-19-13-21.7-12.4-24.5.6-2.8-.2-4.4-6.9-14.3l-7.6-11.1-.6-11-.7-11-9-15.3-8.9-15.2h-8.2c-7.6 0-10.6-.9-10.6-3.2 0-.4 3.6-.8 8-.8 7.7 0 8-.1 7-2-.9-1.7-2.3-2-10.1-2.2l-9.1-.3L150 39l-11.7-18.5-12.5-.1-12.4-.1-12 18.8zM183 96.2c25 40.3 46.8 75.6 48.6 78.3l3.2 5.1-8.8 13.9-8.7 14-91.4.3-91.4.2-8.8-14c-7.5-12-8.6-14.4-7.7-16.1.9-1.7 86.2-139.3 93.7-151.1L114 23h23.6L183 96.2z"/><path d="M103 54.6c-8 13.1-14.5 24-14.4 24.3 0 .3 2.1 1.7 4.6 3l4.5 2.4 4.7-3.2c16-11 30.3-11.4 45-1.1 3.2 2.2 6.2 4 6.8 4 1.5 0 8.8-4.2 8.8-5.1 0-.5-6.5-11.3-14.3-24.1l-14.4-23.3-8.4-.3-8.4-.3L103 54.6zm25.5-8.6c0 6.3-.1 6.5-2.7 6.8l-2.8.3V38.9l2.8.3c2.6.3 2.7.5 2.7 6.8z"/><path d="M116.6 82.6c-6.9 2.2-15.7 11.1-17.7 17.9-5.7 19.8 8.9 38.8 28.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5 0-1 1.1-1 2.4z"/></svg>
\ No newline at end of file
--- /dev/null
+{
+ "name": "Delta Labs",
+ "short_name": "Delta Labs",
+ "icons": [
+ {
+ "src": "android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone"
+}
--- /dev/null
+<?php
+/**
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE
+ *
+ * You should have received a copy of the
+ * COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+ * along with this program. If not, see http://www.sun.com/cddl/cddl.html
+ *
+ * 2019 https://www.bananas-playground.net/projekt/selfpaste
+ */
+?>
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="author" content="Delta Labs">
+ <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
+ <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
+ <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
+ <link rel="manifest" href="site.webmanifest">
+ <link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5">
+ <meta name="msapplication-TileColor" content="#da532c">
+ <meta name="theme-color" content="#ffffff">
+ </head>
+ <body>
+ <p>Well, hello there sweetie!<br />Thank you for using Delta Labs.</p>
+ </body>
+</html>