non working experimental status

This commit is contained in:
Marc Wäckerlin
2016-01-08 11:40:36 +00:00
parent d7bf59444e
commit 787eefc67c
11 changed files with 97 additions and 52 deletions

View File

@@ -29,8 +29,10 @@ function send($user, $msg) {
if (strlen($_REQUEST['msg'])>100000) error("message is too long");
$q = $db->query("select pubkey from user where name='$user';");
if (!$q || $q->num_rows!=1) error("user not found on server");
/*
$pubkey = gnupg_import($pgp, $q->fetch_row()[0]);
if (!$pubkey) error("wrong identity");
*/
$q = $db->query("insert into message (user, msg) values ('$user', '$msg');");
if (!$q) {
error_log("Error storing message: ".$db->error);