github RunOnFlux/flux v8.3.1

14 hours ago

PR Description

Summary

This PR fixes issues with the auto-renewal expiration detection logic in the message verifier, specifically addressing problems with enterprise app spec comparison.

Changes

  • Replace JSON.stringify comparison with deep equality check - The previous isExpireOnlyUpdate function used JSON.stringify() to compare app specs, which is order-dependent and could fail when object properties are in different orders. Added a custom deepEqual function that correctly compares objects regardless of property order.

  • Change address that can extend apps for a new address (not known), previous address was not used yet as it was not working.

  • Fix enterprise app spec decryption for existing specs - For v8+ enterprise apps, only the new spec was being decrypted before comparison. The existing spec also needs to be decrypted to properly compare the two specs. This was causing auto-renew validation to fail for enterprise apps because encrypted specs were being compared against decrypted ones.

  • Add debug logging - Added informative log messages to isExpireOnlyUpdate to help diagnose comparison failures and confirm successful matches.

Files Changed

  • ZelBack/src/services/appMessaging/messageVerifier.js

Technical Details

The isExpireOnlyUpdate function is used to validate that a userToExtend address can only extend an app's expiration without making other changes. The fix ensures:

  1. Both new and existing enterprise specs are decrypted before comparison
  2. Object comparison works correctly regardless of JSON property ordering
  3. Proper logging for troubleshooting renewal issues

Testing

  • Verified that expire-only updates are correctly detected for both regular and enterprise apps
  • Confirmed that property order differences no longer cause false negatives

Don't miss a new flux release

NewReleases is sending notifications on new releases.