Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve pastebin example

Reject more malicious paths.
  • Loading branch information...
commit a9294e0f5079d8a7a424cdffc7d5f22ec94825c5 1 parent e3daf43
@acammack acammack authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  examples/rest_pastebin/src/toppage_handler.erl
View
1  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() ->
Please sign in to comment.
Something went wrong with that request. Please try again.