Skip to content

Commit

Permalink
More lax version string detection
Browse files Browse the repository at this point in the history
  • Loading branch information
lokiuox committed Aug 28, 2024
1 parent 2c510cc commit bd1c118
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ private String detectMagentoVersion(NetworkService networkService) {

try {
HttpResponse response = this.httpClient.send(req, networkService);
if (response.status().code() == HttpStatus.OK.code()
&& response.bodyString().orElse("").startsWith("Magento")) {
if (response.status() == HttpStatus.OK && response.bodyString().orElse("").contains("Magento")) {
String version = response.bodyString().get();
logger.atInfo().log("Detected Magento version: '%s'", version);
return version;
Expand Down

0 comments on commit bd1c118

Please sign in to comment.