aboutsummaryrefslogtreecommitdiff
path: root/subsonic-main/src/main/java/net
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2012-12-10 10:38:57 -0800
committerdaneren2005 <daneren2005@gmail.com>2012-12-10 10:38:57 -0800
commit8c2e09b69b7a4aaf15d545a9b84d1c178ba59f3f (patch)
treea43f71a4224a34c94f991970fb2a76cd79db14f4 /subsonic-main/src/main/java/net
parent880da5f0f9bded724e45c95b7393703a813a05f7 (diff)
downloaddsub-8c2e09b69b7a4aaf15d545a9b84d1c178ba59f3f.tar.gz
dsub-8c2e09b69b7a4aaf15d545a9b84d1c178ba59f3f.tar.bz2
dsub-8c2e09b69b7a4aaf15d545a9b84d1c178ba59f3f.zip
Server: Remove license check
Diffstat (limited to 'subsonic-main/src/main/java/net')
-rw-r--r--subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java33
1 files changed, 2 insertions, 31 deletions
diff --git a/subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java b/subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java
index afb5cdc7..a0b3e8d5 100644
--- a/subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java
+++ b/subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java
@@ -607,14 +607,11 @@ public class SettingsService {
}
public boolean isLicenseValid() {
- return isLicenseValid(getLicenseEmail(), getLicenseCode()) && licenseValidated;
+ return true;
}
public boolean isLicenseValid(String email, String license) {
- if (email == null || license == null) {
- return false;
- }
- return license.equalsIgnoreCase(StringUtil.md5Hex(email.toLowerCase()));
+ return true;
}
public String getDownsamplingCommand() {
@@ -1194,33 +1191,7 @@ public class SettingsService {
}
private void validateLicense() {
- String email = getLicenseEmail();
- Date date = getLicenseDate();
-
- if (email == null || date == null) {
- licenseValidated = false;
- return;
- }
-
licenseValidated = true;
-
- HttpClient client = new DefaultHttpClient();
- HttpConnectionParams.setConnectionTimeout(client.getParams(), 120000);
- HttpConnectionParams.setSoTimeout(client.getParams(), 120000);
- HttpGet method = new HttpGet("http://subsonic.org/backend/validateLicense.view" + "?email=" + StringUtil.urlEncode(email) +
- "&date=" + date.getTime() + "&version=" + versionService.getLocalVersion());
- try {
- ResponseHandler<String> responseHandler = new BasicResponseHandler();
- String content = client.execute(method, responseHandler);
- licenseValidated = content != null && content.contains("true");
- if (!licenseValidated) {
- LOG.warn("License key is not valid.");
- }
- } catch (Throwable x) {
- LOG.warn("Failed to validate license.", x);
- } finally {
- client.getConnectionManager().shutdown();
- }
}
public void validateLicenseAsync() {