sshaw/Mojolicious-Plugin-DigestAuth — pull request #7 by Robertof (2014-05-13 16:27:26+00:00)
Title: Dereference before getting the first element

I was having problems with Firefox and this plugin after restarting the webserver.

After some investigating, I found that after the webserver has been restarted a different `opaque` value is generated. This shouldn't happen, because the browsers cache the `opaque` value too (with the other `Authentication` parameters), and when they send the old one the plugin will return a `Bad request`.

I found that with https://github.com/sshaw/Mojolicious-Plugin-DigestAuth/commit/87fc55d6f2582782838ef9b36ef5194d6a81b1af the support to the `secrets` method has been added. However, probably you have forgotten the dereferencing operator, because the method returns an array reference (and you try with `[]` too!). This fixes it, and also solves the `opaque` problems with the browsers.

Thank you for your great plugin, by the way.