Commit 3023245c4f75f2ffc9ab3fbb7b8d89012d165108
1 parent
edb8b6e81d
Exists in
master
Pengamanan tambahan
Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff
lib/modem.js
... | ... | @@ -189,6 +189,8 @@ async function registerSignalStrengthBackgroundQuery() { |
189 | 189 | } |
190 | 190 | |
191 | 191 | async function sendSMS(destination, msg) { |
192 | + if (typeof destination !== 'string' || typeof msg !== 'string' || !destination.trim() || !msg.trim()) return; | |
193 | + | |
192 | 194 | await mutex.setLockWaitForCommand(); |
193 | 195 | logger.info('Sending message', { destination, msg }); |
194 | 196 |