GithubHelp home page GithubHelp logo

matthewc / yourls-password-protection Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 5.0 50 KB

A simple plugin to add password protection to your short urls!

License: MIT License

PHP 100.00%
plugin yourls yourls-plugin

yourls-password-protection's Introduction

YOURLS Password Protection

Plugin for YOURLS >= 1.7.3.

Description

The Password Protection plugin will give you the ability to password protect any short URL you want (passwords are set individually)! The plugin will prompt the user for a password before redircting them!

Installation

  1. In /user/plugins, create a new folder named password-protection.
  2. Drop these files in that directory.
  3. Go to the plugins administration page ( eg http://sho.rt/admin/plugins.php ) and activate the plugin.
  4. Configure the plugin ( eg http://sho.rt/admin/plugins.php?page=matthew_pwp )!
  5. Have fun!

Example

Password Manager Example

License

MIT

yourls-password-protection's People

Contributors

matthewc avatar stefano-zebedee avatar xhit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yourls-password-protection's Issues

1.7.9 - does not work

Hi. I can’t get plugin to work in current version. I’m using the docker image. I can set a password and enable it but it doesn’t follow through.

Any tips?

Fatal Error after YOURLS 1.9 update.

This is the following error.

Fatal error: Uncaught BadMethodCallException: Class 'YOURLS\Database\YDB' does not have a method 'get_results' in /includes/vendor/aura/sql/src/AbstractExtendedPdo.php:113 Stack trace: #0 /user/plugins/yourls-password-protection/plugin.php(232): Aura\Sql\AbstractExtendedPdo->__call() #1 /user/plugins/yourls-password-protection/plugin.php(208): matthew_pwprotection_process_display() #2 /includes/functions-plugins.php(819): matthew_pwprotection_display_page() #3 /admin/plugins.php(8): yourls_plugin_admin_page() #4 {main} thrown in /includes/vendor/aura/sql/src/AbstractExtendedPdo.php on line 113

I rolled back to 1.8.2 and the error stopped happening so something changed in the most recent update to cause this plugin to stop working. Hope this information helps, have a good day!

pre_redirect add_action not working

Hi
I installed your plugin into the system. Everything works great. I am able to save a password against the URL in the options in database . But however, your pre_redirect is not working. Function defined in the yourls_add_action( 'pre_redirect', 'warning_redirection' ); is not getting called whenever the shortened link gets open. Any help or idea why this is happening. The rest of the functionality is working absolutely fine. Am I missing something over here??

Can't submit password

image

Clicking submit doesn't do anything--not even a console error 😭

I'm on YOURLs 1.9.2.

Password Delete

Hello Matthew,

thirst of all, thanks for the plugin ;) but if I delete a Short-URL, the password still exists in the DB. U should delete it in Database too.

Best Regards
Achim

Errors when enabling plugin

When I click Activate I'm getting the following error.

Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, 
null given in /var/www/html/user/plugins/password-protection/plugin.php:33 
Stack trace: #0 /var/www/html/includes/functions-plugins.php(232): warning_redirection(Array) 
#1 /var/www/html/includes/functions-plugins.php(282): yourls_apply_filter('pre_redirect', Array, true) 
#2 /var/www/html/includes/functions.php(217): yourls_do_action('pre_redirect', 'http://supertes...', 302) 
#3 /var/www/html/admin/plugins.php(26): yourls_redirect('http://supertes...', 302) 
#4 {main} thrown in /var/www/html/user/plugins/password-protection/plugin.php on line 33

Text and border not visible in password dialog

Please see the attached file
PP_Area_Snip

I only changed the colors, but in the main PHP file, I am not able to figure it out that why any text or border is not showing. Moreover, entering wrong password does not throw any error popup or warning.

Plugin causing HTTP Error 500

Suddenly maybe 1-2 weeks ago, my Yourls started giving me 500 errors when I attempted to navigate to them. After troubleshooting, I've found that this plugin appears to be the culprit.

With the plugin disabled, all of my Yourls redirect without issue. When I then enable the plugin, I immediately see a 500 error. Refreshing the page clears the 500 error and I can again navigate to any of the Yourls I had navigated to previously before enabling the plugin. However, if I attempt to navigate to any new Yourls or any pre-existing Yourls which I had not visited before enabling the plugin, I will consistently see a 500 error. Disabling this plugin fixes the issue and allows the redirect to happen successfully.

Additionally, when I navigate to the plugin's settings page with the plugin enabled, it appears that there are missing settings. Nothing appears except column titles.

Here is a screencast where I reproduce the issue: http://ca.mag.cm/02f8f3290346

I'm running Yourls v1.7.3

I'm not very technically skilled so I don't really know how to investigate further. However, I figured I would report this situation in case it is of any use. Let me know if I've forgotten to include any details.

Support pagination

When a lot of shorts URL, the displayed table can freeze the browser, also is very slow to load.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.