commit
e816db687c
13
pom.xml
13
pom.xml
@ -110,13 +110,13 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.versioneye</groupId>
|
<groupId>com.versioneye</groupId>
|
||||||
<artifactId>versioneye-maven-plugin</artifactId>
|
<artifactId>versioneye-maven-plugin</artifactId>
|
||||||
<version>3.5.1</version>
|
<version>3.5.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<projectId>55bab9e8653762002000190a</projectId>
|
<projectId>55bab9e8653762002000190a</projectId>
|
||||||
<!--<apiKey>my_secret_api_key</apiKey>-->>
|
<!--<apiKey>my_secret_api_key</apiKey> -->
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
@ -178,6 +178,12 @@
|
|||||||
<url>http://ci.xephi.fr/plugin/repository/everything/</url>
|
<url>http://ci.xephi.fr/plugin/repository/everything/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<!-- Metrics Snapshots Repo -->
|
||||||
|
<repository>
|
||||||
|
<id>mcstats-snapshots</id>
|
||||||
|
<url>http://repo.mcstats.org/content/repositories/snapshots/</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -233,10 +239,11 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Metrics API -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mcstats.bukkit</groupId>
|
<groupId>org.mcstats.bukkit</groupId>
|
||||||
<artifactId>metrics</artifactId>
|
<artifactId>metrics</artifactId>
|
||||||
<version>R7</version>
|
<version>R8-SNAPSHOT</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
|||||||
@ -395,7 +395,7 @@ public class BCRYPT implements EncryptionMethod {
|
|||||||
off = 3;
|
off = 3;
|
||||||
else {
|
else {
|
||||||
minor = salt.charAt(2);
|
minor = salt.charAt(2);
|
||||||
if (minor != 'a' || salt.charAt(3) != '$')
|
if (minor < 'a' || minor > 'z' || salt.charAt(3) != '$')
|
||||||
throw new IllegalArgumentException("Invalid salt revision");
|
throw new IllegalArgumentException("Invalid salt revision");
|
||||||
off = 4;
|
off = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ public class BCRYPT2Y implements EncryptionMethod {
|
|||||||
@Override
|
@Override
|
||||||
public boolean comparePassword(String hash, String password,
|
public boolean comparePassword(String hash, String password,
|
||||||
String playerName) throws NoSuchAlgorithmException {
|
String playerName) throws NoSuchAlgorithmException {
|
||||||
String ok = hash.substring(29);
|
String ok = hash.substring(0, 29);
|
||||||
if (ok.length() != 29)
|
if (ok.length() != 29)
|
||||||
return false;
|
return false;
|
||||||
return hash.equals(getHash(password, ok, playerName));
|
return hash.equals(getHash(password, ok, playerName));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user