FIXED: fixed bug in NOTEDB::mysql, which caused note t store NULL values

in db, if encryption was off. A really dump failure :-(
This commit is contained in:
TLINDEN
2012-02-10 20:13:51 +01:00
parent 4a5dd8c4bd
commit 2287e23f35
6 changed files with 36 additions and 11 deletions

View File

@@ -1,5 +1,11 @@
==================================================================================
1.0.1:
FIXED: fixed bug in NOTEDB::mysql, which caused note t store NULL values
in db, if encryption was off. A really dump failure :-(
==================================================================================
1.0.0:
CHANGED: removed install.sh. use now a Makefile for installation.
ADDED: Encryption support. Note can now encrypt notes using IDEA

View File

@@ -1,5 +1,5 @@
#!/usr/bin/perl
# $Id: binary.pm,v 1.4 2000/04/17 17:39:27 thomas Exp thomas $
# $Id: binary.pm,v 1.5 2000/04/26 22:57:38 thomas Exp thomas $
# Perl module for note
# binary database backend. see docu: perldoc NOTEDB::binary
#
@@ -25,7 +25,7 @@ BEGIN {
my ($NOTEDB, $sizeof, $typedef,$version);
my ($cipher);
$version = "(NOTEDB::binary, 1.4)";
$version = "(NOTEDB::binary, 1.5)";
sub new
@@ -348,6 +348,13 @@ NOTEDB::binary - module lib for accessing a notedb from perl
# delete a certain note
$db->set_del(5);
# turn on encryption. CryptMethod must be IDEA, DES or BLOWFISH
$db->use_crypt("passphrase", "CryptMethod");
# turn off encryption. This is the default.
$db->no_crypt();
=head1 DESCRIPTION
You can use this module for accessing a note database. There are currently

View File

@@ -1,5 +1,5 @@
#!/usr/bin/perl
# $Id: mysql.pm,v 1.3 2000/04/17 17:39:37 thomas Exp thomas $
# $Id: mysql.pm,v 1.4 2000/04/26 22:57:50 thomas Exp thomas $
# Perl module for note
# mysql database backend. see docu: perldoc NOTEDB::binary
#
@@ -28,7 +28,7 @@ $table = "note";
$fnum = "number";
$fnote = "note";
$fdate = "date";
$version = "(NOTEDB::mysql, 1.3)";
$version = "(NOTEDB::mysql, 1.4)";
# prepare some std statements... #####################################################################
my $sql_getsingle = "SELECT $fnote,$fdate FROM $table WHERE $fnum = ?";
@@ -243,8 +243,11 @@ sub uen
if($NOTEDB::crypt_supported == 1) {
eval {
$T = pack("u", $cipher->encrypt($_[0]));
}
};
}
else {
$T = $_[0];
}
chomp $T;
return $T;
}
@@ -255,9 +258,12 @@ sub ude
if($NOTEDB::crypt_supported == 1) {
eval {
$T = $cipher->decrypt(unpack("u",$_[0]))
}
}
return $T;
};
return $T;
}
else {
return $_[0];
}
}
1; # keep this!
@@ -303,6 +309,12 @@ NOTEDB::mysql - module lib for accessing a notedb from perl
# delete a certain note
$db->set_del(5);
# turn on encryption. CryptMethod must be IDEA, DES or BLOWFISH
$db->use_crypt("passphrase", "CryptMethod");
# turn off encryption. This is the default.
$db->no_crypt();
=head1 DESCRIPTION
You can use this module for accessing a note database. There are currently

2
README
View File

@@ -1,4 +1,4 @@
note 1.0.0 by Thomas Linden, 18/04/2000
note 1.0.1 by Thomas Linden, 18/04/2000
Introduction

View File

@@ -1 +1 @@
1.0.0
1.0.1

View File

@@ -121,7 +121,7 @@ $TIME_COLOR = "black";
$TOPIC_COLOR = "BLACK";
$TOPIC = 1;
$TopicSep = '/';
$version = "1.0.0";
$version = "1.0.1";
if($TOPIC)
{
$CurDepth = 1; # the current depth inside the topic "directory" structure...