-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mac check bug #830
Fix mac check bug #830
Conversation
Codecov Report
@@ Coverage Diff @@
## master #830 +/- ##
============================================
+ Coverage 71.16% 71.88% +0.72%
- Complexity 4358 4389 +31
============================================
Files 283 286 +3
Lines 20967 21085 +118
Branches 2959 2967 +8
============================================
+ Hits 14921 15157 +236
+ Misses 4566 4437 -129
- Partials 1480 1491 +11
Continue to review full report at Codecov.
|
Change-Id: If7df1f3906b334bdf82523a07f4a1fa040f729d3
hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifyManager.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifyManager.java
Outdated
Show resolved
Hide resolved
String expectFormatMac = expectMac.replaceAll(":", "-"); | ||
List<String> actualMacs = this.machineInfo.getMacAddress(); | ||
for (String actualMac : actualMacs) { | ||
String actualFormatMac = actualMac.replaceAll(":", "-"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not keep ":"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be two kinds of join symbols in the mac address, ':' and '-', they are both valid. To avoid check failures due to symbol mismatches, so unified the symbol to '-'
Change-Id: I4a7fff3a8378f0bf10949005f94e40debce64b19
} | ||
if (!matched) { | ||
throw newLicenseException( | ||
"The server's mac '%s' doesn't match the authorized '%s'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to "The server's macs '%s' don't"
align with newLicenseException
Change-Id: Ib2413bc1f215a964c890bb98909575f0d756f400
hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifyManager.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/license/LicenseVerifyManager.java
Outdated
Show resolved
Hide resolved
8452eae
to
e54bc6b
Compare
Change-Id: I9bdbba070f763d9a6a69c1152401097dd61e844e
Change-Id: If7df1f3906b334bdf82523a07f4a1fa040f729d3