Giter VIP home page Giter VIP logo

Comments (2)

issuemover631 avatar issuemover631 commented on May 31, 2024

Comment by silviuvulcan
Friday Feb 20, 2015 at 11:44 GMT


I think the SettingsService.java file changed, this is the new patch file that works for me:

--- SettingsService.java.orig   2015-02-20 06:09:03.000000000 -0500
+++ SettingsService.java        2015-02-20 06:16:31.049891218 -0500
@@ -679,10 +679,7 @@
     }

     public boolean isLicenseValid(String email, String license) {
-        if (email == null || license == null) {
-            return false;
-        }
-        return license.equalsIgnoreCase(StringUtil.md5Hex(email.toLowerCase()));
+        return true;
     }

     public LicenseInfo getLicenseInfo() {
@@ -1379,38 +1376,7 @@
     }

     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("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();
-        }
     }

     public synchronized void scheduleLicenseValidation() {

from airsonic.

issuemover631 avatar issuemover631 commented on May 31, 2024

Comment by silviuvulcan
Friday Feb 27, 2015 at 07:01 GMT


I see 5.2 has been pushed now.

from airsonic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.