Skip to content

Commit

Permalink
Fix include, prevent access for external shares
Browse files Browse the repository at this point in the history
closes #4, #5
  • Loading branch information
winkelement committed Nov 22, 2020
1 parent 5c2fa65 commit 662bdee
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions hooks/all.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

if (strpos($_SERVER['REQUEST_URI'], "k=") == false) {

function HookRs_tooltipAllAdditionalheaderjs()
{
global $baseurl,$tooltip_display_theme;
Expand Down Expand Up @@ -53,3 +55,4 @@ functionBefore: function(instance, helper)
<?php
}
}
}
4 changes: 2 additions & 2 deletions include/generate.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
require_once "../../../include/db.php";

include_once "../../../include/db.php";
include_once "../../../include/authenticate.php";
require_once "../../../include/general.php";

$ID = filter_input(INPUT_GET, 'ref', FILTER_VALIDATE_INT);

Expand Down
2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2018 Robert Damrau
Copyright (c) 2016-2020 Robert Lanzke

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion pages/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# optional introductory text. Set $page_intro to "" for no intro text
# Change to match your plugin.
$plugin_name = 'rs_tooltip';
$page_heading = 'Resource tooltips'; // Replace me
$page_heading = 'Resource Tooltips'; // Replace me
$page_intro = '';
$page_def = array();
$page_def[] = config_add_multi_ftype_select('tooltip_display_fields', $lang['tooltip_display_fields']);
Expand Down
8 changes: 5 additions & 3 deletions rs_tooltip.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: rs_tooltip
author: Robert Damrau
version: 0.4
desc: Display resource metadata in a tooltip when hovering thumbs.
title: RS Tooltip
author: Robert Lanzke
version: 0.5
desc: Display resource metadata in a tooltip when hovering thumbnail images.
icon: fa fa-info-circle
config_url: /plugins/rs_tooltip/pages/setup.php
info_url: https://github.com/winkelement/rs_tooltip
category: User Interface

0 comments on commit 662bdee

Please sign in to comment.