--- loncom/auth/lonacc.pm 2012/05/30 20:29:49 1.138 +++ loncom/auth/lonacc.pm 2012/08/21 17:51:58 1.139 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.138 2012/05/30 20:29:49 raeburn Exp $ +# $Id: lonacc.pm,v 1.139 2012/08/21 17:51:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -156,7 +156,13 @@ sub get_posted_cgi { for ($i=0;$i<=$#lines;$i++) { if ($lines[$i]=~/^--\Q$contentsep\E/) { if ($name) { - $value=~s/[\r\n]+$//; + chomp($value); + if (($r->uri eq '/adm/portfolio') && + ($name eq 'uploaddoc')) { + if (length($value) == 1) { + $value=~s/[\r\n]$//; + } + } if (ref($fields) eq 'ARRAY') { next if (!grep(/^\Q$name\E$/,@{$fields})); }