Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
369e2b6a
Commit
369e2b6a
authored
22 years ago
by
Dave Cramer
Browse files
Options
Downloads
Patches
Plain Diff
Applied patch for MD5 bug submitted by Jun Kawai
parent
875364e5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
+11
-10
11 additions, 10 deletions
...es/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
with
11 additions
and
10 deletions
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
+
11
−
10
View file @
369e2b6a
...
@@ -13,7 +13,7 @@ import org.postgresql.largeobject.LargeObjectManager;
...
@@ -13,7 +13,7 @@ import org.postgresql.largeobject.LargeObjectManager;
import
org.postgresql.util.*
;
import
org.postgresql.util.*
;
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.
3
2002/0
7/26 05:29:34 barry
Exp $
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.
4
2002/0
8/16 19:34:57 davec
Exp $
* This class defines methods of the jdbc1 specification. This class is
* This class defines methods of the jdbc1 specification. This class is
* extended by org.postgresql.jdbc2.AbstractJdbc2Connection which adds the jdbc2
* extended by org.postgresql.jdbc2.AbstractJdbc2Connection which adds the jdbc2
* methods. The real Connection class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Connection
* methods. The real Connection class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Connection
...
@@ -180,6 +180,7 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
...
@@ -180,6 +180,7 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
{
{
int
beresp
=
pg_stream
.
ReceiveChar
();
int
beresp
=
pg_stream
.
ReceiveChar
();
String
salt
=
null
;
String
salt
=
null
;
byte
[]
md5Salt
=
new
byte
[
4
];
switch
(
beresp
)
switch
(
beresp
)
{
{
case
'E'
:
case
'E'
:
...
@@ -207,12 +208,12 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
...
@@ -207,12 +208,12 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
// Or get the md5 password salt if there is one
// Or get the md5 password salt if there is one
if
(
areq
==
AUTH_REQ_MD5
)
if
(
areq
==
AUTH_REQ_MD5
)
{
{
byte
[]
rst
=
new
byte
[
4
];
rs
t
[
0
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
md5Sal
t
[
0
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
rs
t
[
1
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
md5Sal
t
[
1
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
rs
t
[
2
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
md5Sal
t
[
2
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
rs
t
[
3
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
md5Sal
t
[
3
]
=
(
byte
)
pg_stream
.
ReceiveChar
();
salt
=
new
String
(
rs
t
,
0
,
4
);
salt
=
new
String
(
md5Sal
t
,
0
,
4
);
if
(
org
.
postgresql
.
Driver
.
logDebug
)
org
.
postgresql
.
Driver
.
debug
(
"MD5 salt="
+
salt
);
if
(
org
.
postgresql
.
Driver
.
logDebug
)
org
.
postgresql
.
Driver
.
debug
(
"MD5 salt="
+
salt
);
}
}
...
@@ -249,7 +250,7 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
...
@@ -249,7 +250,7 @@ public abstract class AbstractJdbc1Connection implements org.postgresql.PGConnec
case
AUTH_REQ_MD5:
case
AUTH_REQ_MD5:
if
(
org
.
postgresql
.
Driver
.
logDebug
)
org
.
postgresql
.
Driver
.
debug
(
"postgresql: MD5"
);
if
(
org
.
postgresql
.
Driver
.
logDebug
)
org
.
postgresql
.
Driver
.
debug
(
"postgresql: MD5"
);
byte
[]
digest
=
MD5Digest
.
encode
(
PG_USER
,
password
,
s
alt
);
byte
[]
digest
=
MD5Digest
.
encode
(
PG_USER
,
password
,
md5S
alt
);
pg_stream
.
SendInteger
(
5
+
digest
.
length
,
4
);
pg_stream
.
SendInteger
(
5
+
digest
.
length
,
4
);
pg_stream
.
Send
(
digest
);
pg_stream
.
Send
(
digest
);
pg_stream
.
SendInteger
(
0
,
1
);
pg_stream
.
SendInteger
(
0
,
1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment