Skip to content

Instantly share code, notes, and snippets.

/shittiest.diff Secret

Created September 1, 2014 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/79df365c1a7c9a7a2ff8 to your computer and use it in GitHub Desktop.
Save anonymous/79df365c1a7c9a7a2ff8 to your computer and use it in GitHub Desktop.
diff --git a/lib/Mojolicious/Plugin/EPRenderer.pm b/lib/Mojolicious/Plugin/EPRen
index a662155..d6106b9 100644
--- a/lib/Mojolicious/Plugin/EPRenderer.pm
+++ b/lib/Mojolicious/Plugin/EPRenderer.pm
@@ -22,7 +22,7 @@ sub register {
my $name = $options->{inline} // $renderer->template_name($options);
return undef unless defined $name;
my @keys = sort grep {/^\w+$/} keys %{$c->stash};
- my $key = md5_sum encode 'UTF-8', join(',', $name, @keys);
+ my $key = unpack("%32W*",join(',', $name, @keys)) % 65535;
# Prepare template for "epl" handler
my $cache = $renderer->cache;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment