@homebridge-wyze-node24/homebridge-wyze-node24 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebridge-wyze-node24/homebridge-wyze-node24",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Wyze Smart Home plugin for Homebridge (Node.js 24 compatible)",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -497,7 +497,14 @@ module.exports = class WyzeCamera extends WyzeAccessory {
497
497
  this.plugin.log(
498
498
  `[Camera Garage Door] Setting Target State for ${this.mac} (${this.display_name}) to ${value}`
499
499
  );
500
- this.plugin.client.garageDoor(this.mac, this.product_model);
500
+ try {
501
+ await this.plugin.client.garageDoor(this.mac, this.product_model);
502
+ } catch (error) {
503
+ this.plugin.log.error(
504
+ `[Camera Garage Door] Error setting target state for ${this.mac}: ${error.message}`
505
+ );
506
+ throw new this.api.hap.HapStatusError(this.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE);
507
+ }
501
508
  if (value == 0) {
502
509
  this.garageDoorService
503
510
  .getCharacteristic(Characteristic.CurrentDoorState)
package/src/security.js CHANGED
@@ -133,6 +133,9 @@ function wrapLogger(log) {
133
133
  }
134
134
 
135
135
  function loadSecretsFromFile(secretsFile, log) {
136
+ if (secretsFile.includes('..') || path.isAbsolute(secretsFile)) {
137
+ throw new Error('Invalid file path')
138
+ }
136
139
  const stat = fs.statSync(secretsFile)
137
140
  // Must not be readable/writable by group/others
138
141
  if ((stat.mode & 0o077) !== 0) {