This repository was archived by the owner on Oct 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
src/main/java/com/BoardiesITSolutions/AndroidMySQLConnector/PacketManager Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ group 'com.BoardiesITSolutions'
2525
2626
2727android {
28- compileSdkVersion 27
28+ compileSdkVersion 28
2929 defaultConfig {
3030 // applicationId "com.BoardiesITSolutions.AndroidMySQLConnector"
3131 minSdkVersion 19
32- targetSdkVersion 27
33- versionCode 9
32+ targetSdkVersion 28
33+ versionCode 14
3434 versionName " 0.23"
3535 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
3636 }
@@ -88,7 +88,7 @@ def getArtifactFullPath() {
8888
8989dependencies {
9090 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
91- implementation ' com.android.support:appcompat-v7:27.1.1 '
91+ implementation ' com.android.support:appcompat-v7:28.0.0-rc02 '
9292 testImplementation ' junit:junit:4.12'
9393 androidTestImplementation ' com.android.support.test:runner:1.0.2'
9494 androidTestImplementation ' com.android.support.test.espresso:espresso-core:3.0.2'
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ private void createAuthenticationPacket() throws IOException
9696 String authSalt2 = this .mysqlConn .getAuthSalt2 ();
9797 String seed = this .mysqlConn .getAuthSalt () + this .mysqlConn .getAuthSalt2 ();
9898 //String updateSeed = this.seed.substring(0, 20);
99- byte [] bytes = seed .getBytes (Charset . forName ( "UTF-8" ) );
99+ byte [] bytes = seed .getBytes (charset );
100100 String temp = readString (bytes );
101101 byte [] password = scramblePassword (this .mysqlConn .getPassword (), temp );
102102
@@ -111,9 +111,13 @@ private void createAuthenticationPacket() throws IOException
111111 //any error either we receive an EOF packet but running show processlist from the server itself
112112 //shows unauthenticated user. Therefore, if we're not connecting to a default database
113113 //add the null terminator to the password, if we are using a default database don't add the null terminator
114+ //but this also only appears to be required on certain MySQL Versions.
114115 if ((this .mysqlConn .getDatabase () == null ) || this .mysqlConn .getDatabase ().length () == 0 )
115116 {
116- dataOutPacket .writeByte (0 ); //Write the null terminator
117+ if (!mysqlConn .getServerVersion ().startsWith ("5.7" ))
118+ {
119+ dataOutPacket .writeByte (0 ); //Write the null terminator
120+ }
117121 }
118122
119123 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ buildscript {
1616 google()
1717 }
1818 dependencies {
19- classpath ' com.android.tools.build:gradle:3.1.3 '
19+ classpath ' com.android.tools.build:gradle:3.1.4 '
2020 if (! publishToMavenLocal) {
2121 classpath ' com.github.dcendents:android-maven-gradle-plugin:1.5'
2222 }
You can’t perform that action at this time.
0 commit comments