{"action":"created","issue":{"url":"https://api.github.com/repos/hvoers/Dancer2-Plugin-Passphrase/issues/10","repository_url":"https://api.github.com/repos/hvoers/Dancer2-Plugin-Passphrase","labels_url":"https://api.github.com/repos/hvoers/Dancer2-Plugin-Passphrase/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/hvoers/Dancer2-Plugin-Passphrase/issues/10/comments","events_url":"https://api.github.com/repos/hvoers/Dancer2-Plugin-Passphrase/issues/10/events","html_url":"https://github.com/hvoers/Dancer2-Plugin-Passphrase/issues/10","id":136939519,"number":10,"title":"using plugin in a Dancer plugin or DBIx Schema","user":{"login":"atoomic","id":405282,"avatar_url":"https://avatars.githubusercontent.com/u/405282?v=3","gravatar_id":"","url":"https://api.github.com/users/atoomic","html_url":"https://github.com/atoomic","followers_url":"https://api.github.com/users/atoomic/followers","following_url":"https://api.github.com/users/atoomic/following{/other_user}","gists_url":"https://api.github.com/users/atoomic/gists{/gist_id}","starred_url":"https://api.github.com/users/atoomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atoomic/subscriptions","organizations_url":"https://api.github.com/users/atoomic/orgs","repos_url":"https://api.github.com/users/atoomic/repos","events_url":"https://api.github.com/users/atoomic/events{/privacy}","received_events_url":"https://api.github.com/users/atoomic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-27T16:43:09Z","updated_at":"2016-02-27T16:54:11Z","closed_at":null,"body":"the plugin works when used inside a dancer route\r\nbut when you want to move it to a library to use it\r\n\r\nthen any password will match... this should not match and even if it s not supported always return false\r\nwould be nice to be able to use it\r\n\r\nHere is an easy way to reproduce the behavior by patching one unit test\r\n````\r\ndiff --git a/t/004_all_algorithm_matching.t b/t/004_all_algorithm_matching.t\r\nindex 36ccf22..e93fe17 100644\r\n--- a/t/004_all_algorithm_matching.t\r\n+++ b/t/004_all_algorithm_matching.t\r\n@@ -4,7 +4,9 @@ use strict;\r\n use warnings;\r\n\r\n use Dancer2;\r\n-use Dancer2::Plugin::Passphrase;\r\n+use Dancer2::Plugin::Passphrase ();\r\n+\r\n+*passphrase = \\&Dancer2::Plugin::Passphrase::passphrase;\r\n\r\n my $secret = \"Super Secret Squirrel\";\r\n````\r\n\r\n````\r\n> prove -Ilib -v t/004_all_algorithm_matching.t\r\nt/004_all_algorithm_matching.t ..\r\n1..26\r\nUse of uninitialized value in subroutine entry at /Users/nicolas/workspace/perl-modules/Dancer2-Plugin-Passphrase/lib/Dancer2/Plugin/Passphrase/Core.pm line 169.\r\nUse of uninitialized value in subroutine entry at /Users/nicolas/workspace/perl-modules/Dancer2-Plugin-Passphrase/lib/Dancer2/Plugin/Passphrase/Core.pm line 169.\r\nok 1 - With Salt - Match plaintext to hash => MD5\r\nnot ok 2 - With Salt - Incorrect passwords should be rejected => MD5\r\nUse of uninitialized value in subroutine entry at /Users/nicolas/workspace/perl-modules/Dancer2-Plugin-Passphrase/lib/Dancer2/Plugin/Passphrase/Core.pm line 169.\r\n````\r\n"},"comment":{"url":"https://api.github.com/repos/hvoers/Dancer2-Plugin-Passphrase/issues/comments/189681433","html_url":"https://github.com/hvoers/Dancer2-Plugin-Passphrase/issues/10#issuecomment-189681433","issue_url":"https://api.github.com/repos/hvoers/Dancer2-Plugin-Passphrase/issues/10","id":189681433,"user":{"login":"atoomic","id":405282,"avatar_url":"https://avatars.githubusercontent.com/u/405282?v=3","gravatar_id":"","url":"https://api.github.com/users/atoomic","html_url":"https://github.com/atoomic","followers_url":"https://api.github.com/users/atoomic/followers","following_url":"https://api.github.com/users/atoomic/following{/other_user}","gists_url":"https://api.github.com/users/atoomic/gists{/gist_id}","starred_url":"https://api.github.com/users/atoomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atoomic/subscriptions","organizations_url":"https://api.github.com/users/atoomic/orgs","repos_url":"https://api.github.com/users/atoomic/repos","events_url":"https://api.github.com/users/atoomic/events{/privacy}","received_events_url":"https://api.github.com/users/atoomic/received_events","type":"User","site_admin":false},"created_at":"2016-02-27T16:54:11Z","updated_at":"2016-02-27T16:54:11Z","body":"or also a warning when plaintext is undefined"}}