fix license

This commit is contained in:
Thein Lin Kyaw
2020-01-29 23:18:15 +06:30
parent be65bcb876
commit 6b5fd4d388

View File

@@ -223,7 +223,9 @@ class License
if File.exist?("config/license.yml")
if license = YAML.load(File.read("config/license.yml"))
AESCrypt.decrypt_data(decode_str(license[lookup][key_name]), decode_str(key), decode_str(iv), ENV['CIPHER_TYPE'])
if license[lookup]
AESCrypt.decrypt_data(decode_str(license[lookup][key_name]), decode_str(key), decode_str(iv), ENV['CIPHER_TYPE'])
end
end
end
end
@@ -232,7 +234,9 @@ class License
def read_license_no_decrypt(key)
if File.exist?("config/license.yml")
if license = YAML.load_file("config/license.yml")
decrypted_line = license[lookup][key]
if license[lookup]
decrypted_line = license[lookup][key]
end
end
end
end