X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/42e7ab8a13679442f2cd7524ab7fa38bb2166951..6fc8c0f3c87e9aaf59aa414a0641db2ac7601d7e:/selfforum-cgi/user/fo_posting.pl?ds=sidebyside diff --git a/selfforum-cgi/user/fo_posting.pl b/selfforum-cgi/user/fo_posting.pl index c78cab7..180233c 100644 --- a/selfforum-cgi/user/fo_posting.pl +++ b/selfforum-cgi/user/fo_posting.pl @@ -21,17 +21,17 @@ use vars qw( # locate the script # BEGIN { -# my $null = $0; $null =~ s/\\/\//g; # for win :-( -# $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.'; -# $Shared = "$Bin/../shared"; -# $Config = "$Bin/config"; -# $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null; - - my $null = $0; #$null =~ s/\\/\//g; # for win :-( + my $null = $0; $null =~ s/\\/\//g; # for win :-( $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.'; - $Config = "$Bin/../../../cgi-config/devforum"; - $Shared = "$Bin/../../../cgi-shared"; + $Shared = "$Bin/../shared"; + $Config = "$Bin/config"; $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null; + +# my $null = $0; #$null =~ s/\\/\//g; # for win :-( +# $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.'; +# $Config = "$Bin/../../../cgi-config/devforum"; +# $Shared = "$Bin/../../../cgi-shared"; +# $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null; } use lib "$Shared"; @@ -817,6 +817,9 @@ sub check_cgi { # (my $val_ww = $val) =~ s/\s+//g; + $val_ww =~ y/a-zA-Z//cd + if (exists ($formdata -> {$name {$_}} -> {type}) and $formdata -> {$name {$_}} -> {type} eq 'name'); + if (length $val_ww < $formdata -> {$name {$_}} -> {minlength}) { $self -> {error} = { spec => 'too_short',