Permalink
Browse files

Improve pastebin example

Reject more malicious paths.
  • Loading branch information...
1 parent e3daf43 commit a9294e0f5079d8a7a424cdffc7d5f22ec94825c5 @acammack acammack committed Feb 15, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 examples/rest_pastebin/src/toppage_handler.erl
@@ -89,6 +89,7 @@ file_exists(Name) ->
valid_path(<<>>) -> true;
valid_path(<<$., _T/binary>>) -> false;
+valid_path(<<$/, _T/binary>>) -> false;
valid_path(<<_Char, T/binary>>) -> valid_path(T).
new_paste_id() ->

0 comments on commit a9294e0

Please sign in to comment.