Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 38 lines (32 sloc) 0.828 kB
6377222 @klacke ""
authored
1
2 <erl>
3
4 out(A) ->
ef3a52a @klacke Removed the atoms in parse_post and parse query, backwards incompatib…
authored
5 L = case queryvar(A,"page") of
dbab7a3 @klacke ssi include with var expansion + docs
authored
6 {ok, Page} ->
d85b418 @klacke security bug found by jcortner@cvol.net
authored
7 %% only allow regular chars in Page
8 case lists:all(fun(C) ->
9 if
10 $a =< C, C =< $z ->
11 true;
12 $A =< C, C =< $Z ->
13 true;
8b75f8b @klacke Fixed probles with paths that had a query part ending up in the cache
authored
14 C == $_ ->
15 true;
ef91478 @klacke ""
authored
16 C == $. ->
17 true;
d85b418 @klacke security bug found by jcortner@cvol.net
authored
18 true ->
19 false
20 end
21 end, Page) of
22 true ->
ef3a52a @klacke Removed the atoms in parse_post and parse query, backwards incompatib…
authored
23 os:cmd("man " ++ Page ++ " | col -b -p -x");
08d72ff Added illegal character check to input to man page command to stop cr…
Johan Bevemyr authored
24 false ->
d85b418 @klacke security bug found by jcortner@cvol.net
authored
25 "illegal character detected in query arg"
08d72ff Added illegal character check to input to man page command to stop cr…
Johan Bevemyr authored
26 end;
bea8261 @klacke added log_wrap_size, configurable wrap size for all logs, fixed a bug…
authored
27 undefined ->
08d72ff Added illegal character check to input to man page command to stop cr…
Johan Bevemyr authored
28 "no man page found in query arg "
29 end,
bea8261 @klacke added log_wrap_size, configurable wrap size for all logs, fixed a bug…
authored
30 {ehtml,
31 {html,[],
32 {'div',[{class,"man"}],
33 {pre,[], L}}}}.
34
35
6377222 @klacke ""
authored
36
37 </erl>
Something went wrong with that request. Please try again.