* cleanups
* edit area for a bookmark
* documentation and sql setup cleanup
+ * new design with bulma.css (https://bulma.io/)
+ * added SEO information to "prevent" crawling and a robots.txt file
+ * new option to restrict access via http basic auth.
+ * very simple user authentication based on http basic auth.
+ Needs improvement in further releases
version 2.0alpha - Bright Crucible - (2017-01-05)
* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2017 Johannes Keßler
+ * Copyright 2016-2018 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
define('FRONTEND_USERNAME','luke');
define('FRONTEND_PASSWORD','father');
+# complete restricted access not only the private links or the edit functions
+# username and password see above
+define("USE_PAGE_AUTH",false);
+
# settings for importing from e-mail
# SSL/TLS only
# imap
# the default script
$ViewScript = 'home.inc.php';
+# if the USE_PAGE_AUTH option is set
+if(defined("USE_PAGE_AUTH") && USE_PAGE_AUTH === true) {
+ # very simple security check.
+ # can/should be extended in the future.
+ Summoner::simpleAuth();
+}
+
## DB connection
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); # throw exeptions
$DB = new mysqli(DB_HOST, DB_USERNAME,DB_PASSWORD, DB_NAME);
* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2017 Johannes Keßler
+ * Copyright 2016-2018 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
if(isset($_POST['data']) && !empty($_POST['data']) && isset($_POST['addnewone']) && $honeypotCheck === false) {
$fData = $_POST['data'];
+ # very simple security check.
+ # can/should be extended in the future.
+ Summoner::simpleAuth();
+
$formData['private'] = 2;
if(isset($fData['private'])) {
$formData['private'] = 1;
$formData['image'] = trim($fData['image']);
$formData['category'] = trim($fData['category']);
$formData['tag'] = trim($fData['tag']);
- $username = trim($fData['username']);
- $password = trim($fData['password']);
$isUrl = Summoner::validate($formData['url'],'url');
- if($isUrl === true && !empty($formData['title']) && $username === FRONTEND_USERNAME && $password === FRONTEND_PASSWORD) {
+ if($isUrl === true && !empty($formData['title'])) {
$hash = md5($formData['url']);
# categories and tag stuff
}
}
else {
- $submitFeedback['message'] = 'Please provide a valid URL, title, username and password.';
+ $submitFeedback['message'] = 'Please provide a valid URL and title.';
$submitFeedback['status'] = 'error';
$showAddForm = true;
}
</div>
</div>
- <div class="columns">
- <div class="column is-half">
- <label class="label">Username</label>
- <div class="control">
- <input class="input" type="text" name="data[username]" />
- </div>
- </div>
- <div class="column is-half">
- <label class="label">Password</label>
- <div class="control">
- <input class="input" type="password" name="data[password]" />
- </div>
- </div>
- </div>
-
<div class="columns">
<div class="column is-half">
<label class="checkbox is-pulled-right">