tazbug diff web/bugs.cgi @ rev 118
Up plugins/users and small improvments to dashboard
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Feb 11 22:27:47 2017 +0100 (2017-02-11) |
parents | b9aaee394e0c |
children | 039c90c60494 |
line diff
1.1 --- a/web/bugs.cgi Sat Feb 11 09:56:12 2017 +0000 1.2 +++ b/web/bugs.cgi Sat Feb 11 22:27:47 2017 +0100 1.3 @@ -177,7 +177,6 @@ 1.4 # Link for online signup if enabled. 1.5 online_signup() { 1.6 if [ "$ONLINE_SIGNUP" == "yes" ]; then 1.7 - echo -n "<p>" && gettext "Or:"; echo -n " " 1.8 echo -n "<a href='$script?signup&online'>" 1.9 gettext "Sign Up Online" 1.10 echo '</a></p>' 1.11 @@ -190,8 +189,7 @@ 1.12 <h2>$(gettext 'Login')</h2> 1.13 1.14 <div id="account-info"> 1.15 -<p>$(gettext "No account yet? You can signup using the SliTaz Bugs reporter \ 1.16 -on your SliTaz system.")</p> 1.17 +<p>$(gettext "No account yet?")</p> 1.18 $(online_signup) 1.19 <p>$(gettext "Tip: to attach big files or images, you can use SliTaz Paste \ 1.20 services:") <a href="http://paste.slitaz.org/">paste.slitaz.org</a></p> 1.21 @@ -551,7 +549,7 @@ 1.22 pass="$(GET pass)" 1.23 echo "Creating Server Key..." 1.24 fi 1.25 - key=$(echo -n "$user:$mail:$pass" | md5sum | awk '{print $1}') 1.26 + #key=$(echo -n "$user:$mail:$pass" | md5sum | awk '{print $1}') 1.27 echo "$user:$pass" >> $AUTH_FILE 1.28 mkdir -pm0700 $PEOPLE/$user/ 1.29 cat > $PEOPLE/$user/account.conf << EOT 1.30 @@ -561,7 +559,6 @@ 1.31 NAME="$name" 1.32 USER="$user" 1.33 MAIL="$mail" 1.34 -KEY="$key" 1.35 1.36 LOCATION="$(GET location)" 1.37 RELEASES="$(GET releases)" 1.38 @@ -754,56 +751,17 @@ 1.39 html_footer ;; 1.40 *\ signup\ *) 1.41 # Signup 1.42 - if [ "$(GET online)" ];then 1.43 - header 1.44 - html_header 1.45 - user_box 1.46 - echo "<h2>$(gettext "Sign Up")</h2>" 1.47 - if [ "$ONLINE_SIGNUP" == "yes" ]; then 1.48 - signup_page 1.49 - else 1.50 - gettext "Online registration is disabled" 1.51 - fi 1.52 - html_footer && exit 0 1.53 + header 1.54 + html_header 1.55 + user_box 1.56 + echo "<h2>$(gettext "Sign Up")</h2>" 1.57 + if [ "$ONLINE_SIGNUP" == "yes" ]; then 1.58 + signup_page 1.59 else 1.60 - header "Content-type: text/plain;" 1.61 - user="$(GET signup)" 1.62 - echo "Requested user login : $user" 1.63 - if fgrep -q "$user:" $AUTH_FILE; then 1.64 - echo "ERROR: User already exists" && exit 1 1.65 - else 1.66 - echo "Creating account for : $(GET name)" 1.67 - new_user_config 1.68 - fi 1.69 - fi ;; 1.70 - *\ key\ *) 1.71 - # Let user post new bug or message with crypted key (no gettext) 1.72 - # 1.73 - # Testing only and is security acceptable ? 1.74 - # 1.75 - key="$(GET key)" 1.76 - id="$(GET bug)" 1.77 - header "Content-type: text/plain;" 1.78 - echo "Checking secure key..." 1.79 - if fgrep -qH $key $PEOPLE/*/account.conf; then 1.80 - conf=$(fgrep -H $key $PEOPLE/*/account.conf | cut -d ":" -f 1) 1.81 - . $conf 1.82 - echo "Authenticated: $NAME ($USER)" 1.83 - case " $(GET) " in 1.84 - *\ msg\ *) 1.85 - [ ! "$id" ] && echo "Missing bug ID" && exit 0 1.86 - echo "Posting new message to bug: $id" 1.87 - echo "Message: $(GET msg)" 1.88 - new_msg ;; 1.89 - *\ bug\ *) 1.90 - echo "Adding new bug: $(GET bug)" 1.91 - echo "Description: $(GET desc)" 1.92 - new_bug ;; 1.93 - esac 1.94 - else 1.95 - echo "Not a valid SliTaz user key" 1.96 - exit 0 1.97 - fi ;; 1.98 + gettext "Online registration is disabled" 1.99 + fi 1.100 + html_footer ;; 1.101 + 1.102 *\ search\ *) 1.103 found=0 1.104 header