summaryrefslogtreecommitdiff
path: root/media-sound/subsonic/files/no-license-5.patch
blob: 3a63fbb859d78f601235ca5872b43dbf15890e3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Index: subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java
===================================================================
--- subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (revision 4108)
+++ subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (working copy)
@@ -654,7 +654,7 @@
         if (email == null || license == null) {
             return false;
         }
-        return license.equalsIgnoreCase(StringUtil.md5Hex(email.toLowerCase()));
+        return true;
     }
 
     public LicenseInfo getLicenseInfo() {
@@ -1272,28 +1272,7 @@
 
         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("false");
-            if (!licenseValidated) {
-                LOG.warn("License key is not valid.");
-            }
-            String[] lines = StringUtils.split(content);
-            if (lines.length > 1) {
-                licenseExpires = new Date(Long.parseLong(lines[1]));
-            }
-
-        } catch (Throwable x) {
-            LOG.warn("Failed to validate license.", x);
-        } finally {
-            client.getConnectionManager().shutdown();
-        }
+        return;
     }
 
     public synchronized void scheduleLicenseValidation() {