mirror of
https://codeberg.org/scip/note.git
synced 2025-12-17 12:41:10 +01:00
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:
@@ -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:
|
1.0.0:
|
||||||
CHANGED: removed install.sh. use now a Makefile for installation.
|
CHANGED: removed install.sh. use now a Makefile for installation.
|
||||||
ADDED: Encryption support. Note can now encrypt notes using IDEA
|
ADDED: Encryption support. Note can now encrypt notes using IDEA
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/perl
|
#!/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
|
# Perl module for note
|
||||||
# binary database backend. see docu: perldoc NOTEDB::binary
|
# binary database backend. see docu: perldoc NOTEDB::binary
|
||||||
#
|
#
|
||||||
@@ -25,7 +25,7 @@ BEGIN {
|
|||||||
my ($NOTEDB, $sizeof, $typedef,$version);
|
my ($NOTEDB, $sizeof, $typedef,$version);
|
||||||
my ($cipher);
|
my ($cipher);
|
||||||
|
|
||||||
$version = "(NOTEDB::binary, 1.4)";
|
$version = "(NOTEDB::binary, 1.5)";
|
||||||
|
|
||||||
|
|
||||||
sub new
|
sub new
|
||||||
@@ -348,6 +348,13 @@ NOTEDB::binary - module lib for accessing a notedb from perl
|
|||||||
# delete a certain note
|
# delete a certain note
|
||||||
$db->set_del(5);
|
$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
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
You can use this module for accessing a note database. There are currently
|
You can use this module for accessing a note database. There are currently
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/perl
|
#!/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
|
# Perl module for note
|
||||||
# mysql database backend. see docu: perldoc NOTEDB::binary
|
# mysql database backend. see docu: perldoc NOTEDB::binary
|
||||||
#
|
#
|
||||||
@@ -28,7 +28,7 @@ $table = "note";
|
|||||||
$fnum = "number";
|
$fnum = "number";
|
||||||
$fnote = "note";
|
$fnote = "note";
|
||||||
$fdate = "date";
|
$fdate = "date";
|
||||||
$version = "(NOTEDB::mysql, 1.3)";
|
$version = "(NOTEDB::mysql, 1.4)";
|
||||||
|
|
||||||
# prepare some std statements... #####################################################################
|
# prepare some std statements... #####################################################################
|
||||||
my $sql_getsingle = "SELECT $fnote,$fdate FROM $table WHERE $fnum = ?";
|
my $sql_getsingle = "SELECT $fnote,$fdate FROM $table WHERE $fnum = ?";
|
||||||
@@ -243,8 +243,11 @@ sub uen
|
|||||||
if($NOTEDB::crypt_supported == 1) {
|
if($NOTEDB::crypt_supported == 1) {
|
||||||
eval {
|
eval {
|
||||||
$T = pack("u", $cipher->encrypt($_[0]));
|
$T = pack("u", $cipher->encrypt($_[0]));
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$T = $_[0];
|
||||||
|
}
|
||||||
chomp $T;
|
chomp $T;
|
||||||
return $T;
|
return $T;
|
||||||
}
|
}
|
||||||
@@ -255,9 +258,12 @@ sub ude
|
|||||||
if($NOTEDB::crypt_supported == 1) {
|
if($NOTEDB::crypt_supported == 1) {
|
||||||
eval {
|
eval {
|
||||||
$T = $cipher->decrypt(unpack("u",$_[0]))
|
$T = $cipher->decrypt(unpack("u",$_[0]))
|
||||||
}
|
};
|
||||||
}
|
return $T;
|
||||||
return $T;
|
}
|
||||||
|
else {
|
||||||
|
return $_[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1; # keep this!
|
1; # keep this!
|
||||||
@@ -303,6 +309,12 @@ NOTEDB::mysql - module lib for accessing a notedb from perl
|
|||||||
# delete a certain note
|
# delete a certain note
|
||||||
$db->set_del(5);
|
$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
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
You can use this module for accessing a note database. There are currently
|
You can use this module for accessing a note database. There are currently
|
||||||
|
|||||||
2
README
2
README
@@ -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
|
Introduction
|
||||||
|
|||||||
2
bin/note
2
bin/note
@@ -121,7 +121,7 @@ $TIME_COLOR = "black";
|
|||||||
$TOPIC_COLOR = "BLACK";
|
$TOPIC_COLOR = "BLACK";
|
||||||
$TOPIC = 1;
|
$TOPIC = 1;
|
||||||
$TopicSep = '/';
|
$TopicSep = '/';
|
||||||
$version = "1.0.0";
|
$version = "1.0.1";
|
||||||
if($TOPIC)
|
if($TOPIC)
|
||||||
{
|
{
|
||||||
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
$CurDepth = 1; # the current depth inside the topic "directory" structure...
|
||||||
|
|||||||
Reference in New Issue
Block a user