Zaid Abdulla
bbc2853cab
Fix updating tags from script
2018-11-30 00:14:51 -08:00
Zaid Abdulla
b9e30e97d8
More coffee to js fixes
2018-11-13 16:58:15 -08:00
Zaid Abdulla
91626a3de5
Fix a couple of coffee to js conversion blunders
2018-10-31 09:08:50 -07:00
Zaid Abdulla
476532af54
Fix crash when declare timestamps are missing
2018-10-22 15:45:09 -07:00
Zaid Abdulla
1a56915d4b
Defer tail declarations
...
declare() calls that aren't followed by commit() are applied at the end
of the provision script. This change defers those until all provisions
have been executed. This prevents certain cases of preset loop faults.
2018-09-15 00:09:58 -07:00
Zaid Abdulla
ec215ffb82
Optimize XML parsing
...
Using XPath expressions appears to be expensive so that has been
replaced with direct child node access. This seems to have improved
performance by 5%.
A side effect of this change is that XML_IGNORE_NAMESPACE option is
no longer needed as namespaces are ignored by default.
2018-09-08 23:49:34 -07:00
Zaid Abdulla
037aa9786d
Optimize PathSet
...
Performance has not been tested but generally avoiding sparse arrays
should result in better performance.
2018-09-08 23:49:14 -07:00
Zaid Abdulla
c2d55f08d4
A few fixes for previous commits
2018-08-28 00:34:18 -07:00
Zaid Abdulla
4b4bcb4516
Optimize VersionedMap
2018-08-27 00:20:10 -07:00
Zaid Abdulla
d3bb5ae16f
Replace object with Map for performance
2018-08-25 17:03:03 -07:00
Zaid Abdulla
09e6a360af
Apply prefer-const lint rule
2018-08-25 16:14:34 -07:00
Zaid Abdulla
b43088c03c
Apply no-buffer-constructor lint rule
2018-08-25 03:24:59 -07:00
Zaid Abdulla
d85afcd2b5
Apply consistent-return lint rule
2018-08-25 03:22:48 -07:00
Zaid Abdulla
d7f0b91bf0
Fix oversight from a previous commit
2018-08-25 02:31:03 -07:00
Zaid Abdulla
e494bdca8a
Introduce ESLint and Prettier
2018-08-24 05:31:22 -07:00
Zaid Abdulla
9c943d0bbf
Remove CoffeeScript dependency
2018-08-24 04:55:59 -07:00
Zaid Abdulla
59a8406f3f
Convert session.coffee to JS
2018-08-24 04:34:49 -07:00
Zaid Abdulla
0680ef1555
Convert cwmp.coffee to JS
2018-08-24 04:29:39 -07:00
Zaid Abdulla
3b9f9f273c
Convert db.coffee to JS
2018-08-24 04:28:08 -07:00
Zaid Abdulla
c836c73ffe
Convert nbi.coffee to JS
2018-08-21 21:01:19 -07:00
Zaid Abdulla
91fb6c1c5a
Convert api-functions.coffee to JS
2018-08-21 21:00:51 -07:00
Zaid Abdulla
3bde08671d
Convert query.coffee to JS
2018-08-21 21:00:32 -07:00
Zaid Abdulla
269f57dec1
Convert auth.coffee to JS
2018-08-21 21:00:32 -07:00
Zaid Abdulla
93bb544f9e
Convert server.coffee to JS
2018-08-21 21:00:32 -07:00
Zaid Abdulla
852b7f38ca
Convert config.coffee to JS
2018-08-21 21:00:26 -07:00
Zaid Abdulla
88d5239fb9
Convert fs.coffee to JS
2018-08-21 11:04:51 -07:00
Zaid Abdulla
31ab6b6a73
Convert common.coffee to JS
2018-08-21 11:04:44 -07:00
Zaid Abdulla
079255d7bd
Add support for base64 and hexBinary types
2018-06-04 15:48:52 -07:00
Zaid Abdulla
a8b7c180f7
Expire fault when original task expires
2018-04-30 17:12:22 -07:00
Zaid Abdulla
0cae1485b5
Fix query unpacking issue with $not operator
2018-04-30 17:11:05 -07:00
Zaid Abdulla
09defce511
Stricter number parsing when unpacking query
2018-04-30 17:10:01 -07:00
Zaid Abdulla
e6caa36aa0
Fix instances being created with undefined values
...
Happens when creating instances using object templates with nested
parameters.
Resolves : #294
2018-04-16 03:38:46 -07:00
Zaid Abdulla
d7997988db
Tolerate missing trailing dot in GPN responses
...
Treat any parameter with children as object even if the device
incorrectly reports it as a regular parameter.
2018-04-16 03:36:58 -07:00
Zaid Abdulla
c7cc4c9d5b
Check object attribute = 0 when generating GPV
2018-04-16 03:35:39 -07:00
Zaid Abdulla
344f4270f2
Fix infinite loop bug in previous commit
2018-03-28 16:56:49 -07:00
Zaid Abdulla
445b01e895
Prevent redundant extension calls
2018-03-24 00:45:12 -07:00
Zaid Abdulla
52bec5b46f
Add config option for max commit iterations
2018-03-24 00:41:17 -07:00
Zaid Abdulla
eb806342b8
Fix bug with overlapping timestamp declarations
2018-03-24 00:39:58 -07:00
Zaid Abdulla
bc8619e199
Fix error trying to trim a partial stack trace
2018-03-19 23:17:39 -07:00
Zaid Abdulla
fb229897f7
1.1.2
2018-02-24 02:41:27 -08:00
Zaid Abdulla
3927b7e383
Update CHANGELOG.md
2018-02-24 02:39:27 -08:00
Zaid Abdulla
afae1e3ada
Update dependencies and add npm-shrinkwrap.json
2018-02-24 02:30:17 -08:00
Zaid Abdulla
f4cf2696f8
Update repo paths in README.md and package.json
2018-02-24 01:30:48 -08:00
Zaid Abdulla
365234d49a
Fault when vparam returns invalid value or type
2018-02-22 01:21:14 -08:00
Zaid Abdulla
0d6f9265f7
Trim stack trace from extension errors
2018-02-21 15:28:47 -08:00
Zaid Abdulla
75ddfc38b1
Fault when ext function doesn't exist
2018-02-21 15:22:12 -08:00
Zaid Abdulla
06508d1797
Fix timeout faults after extension crash
2018-02-21 15:07:30 -08:00
Zaid Abdulla
521907fa7d
Exit main process after too many exceptions
2018-01-11 06:20:25 -08:00
Zaid Abdulla
2f276c7ce2
Remove retryNow after preset_loop fault
2018-01-11 06:20:25 -08:00
Zaid Abdulla
f10056ec2e
Can't write exception after response was sent
2018-01-11 06:20:25 -08:00
Zaid Abdulla
779cb1b7a2
Enforce session state
...
A fix for a security vulnerability reported by Maximilian Hils.
2018-01-11 06:20:25 -08:00
Zaid Abdulla
bbe4def5cf
No Basic auth for connection requests by default
...
A fix for a security vulnerability reported by Maximilian Hils.
2018-01-11 06:20:25 -08:00
Zaid Abdulla
88a50a3387
Disable XXE processing in Libxml
...
A fix for a security vulnerability reported by Maximilian Hils.
2018-01-11 06:20:25 -08:00
Zaid Abdulla
c99496527d
Optimize GPN nextLevel heuristic
2017-12-12 16:17:15 -08:00
Zaid Abdulla
32b2d721e5
Avoid extra query caused by unsaved event codes
...
Since not all event codes are saved (for compatibility reasons), such
event codes (e.g. "2 PERIODIC") causes a new param to be created which
results in a DB query to perform clear() operation.
2017-11-27 16:13:46 -08:00
Zaid Abdulla
945323a7da
Avoid extra declare cycle when refreshing vparams
2017-11-27 16:13:15 -08:00
Zaid Abdulla
8b400a45b5
Fix preset_loop fault introduced in #93452d4
2017-11-26 12:40:05 -08:00
Zaid Abdulla
3adee03533
Fix bug where declare returns wrong value
2017-11-21 01:11:44 -08:00
Zaid Abdulla
4288fd5980
Reimplement parsing auth header
...
Resolves #257
2017-11-13 22:52:14 -08:00
Zaid Abdulla
ec57131d51
Log only non-default config
2017-11-12 13:01:39 -08:00
Zaid Abdulla
6bfe590b0d
Config to use 1/0 for booleans
2017-11-12 12:56:41 -08:00
Zaid Abdulla
f7c1857b6a
Config to strip milliseconds from dateTime
2017-11-12 12:29:18 -08:00
Zaid Abdulla
6a9c62b639
Support time discretization in scripts
...
This can be used to ensure parameter refresh times are aligned (as
opposed to using Date.now() - X). It also allows for possible future
optimizations by exploiting the fact that the value of Date.now(X)
remains static for a given amount of time.
The variance value can be used to shift the discretization threshold
points based on the hash of the device ID for load distribution.
The djb2 hashing algorithm has been replaced with MD5 for better
distribution.
2017-11-10 14:34:24 -08:00
Zaid Abdulla
ed873cdd4a
Only invalidate syncState after read stage
...
This is in order to reduce the number of commit iterations especially
during the initial discovery of the data model.
2017-11-04 22:09:52 -07:00
Zaid Abdulla
14bf276112
Clamp param timestamp values to session timestamp
2017-11-04 22:02:22 -07:00
Zaid Abdulla
93452d445f
Fix bug updating tags not triggering preset rerun
2017-11-04 20:47:55 -07:00
Zaid Abdulla
a436f17888
Replace endless_cycle with more specific faults
2017-10-31 12:58:00 -07:00
Zaid Abdulla
947b4d7118
Fix bug adding duplicate provisions in session
2017-10-29 12:45:26 -07:00
Zaid Abdulla
b152071085
Fix exception when logging invalid session
...
Resolves #269
2017-10-23 17:09:37 -07:00
Zaid Abdulla
9dcd55a84f
Log XML parse errors
2017-10-09 00:28:02 -07:00
Zaid Abdulla
342138d92e
Log session timeout and connection drop
2017-10-09 00:25:32 -07:00
Zaid Abdulla
ef712de9e3
Fix concurrent requests counter leak
2017-09-18 13:51:22 -07:00
Zaid Abdulla
b2c5f5ecc9
Handle overload spikes gracefully
2017-09-16 22:43:17 -07:00
Zaid Abdulla
f0b9c32ab4
Improve service shutdown process
2017-09-16 22:38:21 -07:00
Zaid Abdulla
3fc13317a2
Include PID in exception logs
2017-09-16 22:36:42 -07:00
Zaid Abdulla
73295729c8
Fix exception when TCP connection drops abruptly
2017-09-16 22:35:46 -07:00
Zaid Abdulla
ed3239e4db
Fix exception when setting invalid bool value
2017-09-16 22:19:10 -07:00
Zaid Abdulla
f2d64d7676
Fix bug deleting specific object instances
2017-09-16 22:16:44 -07:00
Zaid Abdulla
1a83dcc1de
Fix issue with declaring values using wildcards
...
When declaring parameter values using a wildcard path, overlapping
declarations are not applied correctly according to their weight and
execution order. The fix is to unpack first then apply the declarations
to the individual parameters.
2017-09-16 22:14:51 -07:00
Zaid Abdulla
4b17c3c9c3
Fix bug when deleting tags from script
2017-08-22 16:07:04 -07:00
Zaid Abdulla
9cb623c096
Expose random seed function to scripts
2017-08-06 16:56:58 -07:00
Zaid Abdulla
7306f7a8a5
Improve set and clear data model functions
2017-08-04 19:29:25 -07:00
Zaid Abdulla
4eb1c61c4b
Fix bug in committing vparam update
2017-07-30 04:57:35 -07:00
Zaid Abdulla
306193e6e9
Don't remove root Tags when empty
...
It unnecessarily complicates things.
2017-07-30 04:54:55 -07:00
Zaid Abdulla
0ca44d7ffb
VersionedMap.delete() should return true/false
2017-07-30 04:52:57 -07:00
Zaid Abdulla
3012f29bb2
Remove redundant delete operator
2017-07-30 04:51:20 -07:00
Zaid Abdulla
8d588507ac
Remove unused arg in extensions.killAll()
2017-07-30 04:50:14 -07:00
Zaid Abdulla
7e6eebc486
Avoid deleting Downloads tree after root GPN
2017-07-19 12:38:40 -07:00
Zaid Abdulla
4be709a61b
Fix orphan extension processes bug
...
Issue happens after an exception occurs and existing sessions fail to
finish within the timeout period.
2017-07-17 13:44:49 -07:00
Zaid Abdulla
d74c56f182
Show 404 when deleting a non-existing task
2017-07-13 21:56:40 -07:00
Zaid Abdulla
444af51307
Fix vparam bug introduced in 68ea488
2017-07-10 15:00:26 -07:00
Zaid Abdulla
bde0bfe616
Fix fault detail when ext throws non-error object
2017-07-04 02:37:08 -07:00
Zaid Abdulla
b13b9a54ab
Skip tree traversal in case of no declarations
2017-07-04 02:35:58 -07:00
Zaid Abdulla
68ea4887b1
Fix repeating vparam execution
...
This issue only happens when a device doesn't maintain a single
connection for the entire session.
2017-07-04 02:30:16 -07:00
Zaid Abdulla
75b10bb528
Fix crash in session.deserialize
...
Resolves #243
2017-07-04 02:26:00 -07:00
Zaid Abdulla
f444ff753c
Optimize loadPath function
2017-06-30 05:12:31 -07:00
Zaid Abdulla
9dd6980da2
Further fixes related to the previous commit
2017-06-30 03:55:50 -07:00
Zaid Abdulla
ec1360217b
Some fixes on fetchDevice function
...
Includes a fix for issue where timestamp for nonexisting root params is
not reported which can result in an unnecessary GPN request.
2017-06-27 01:06:02 -07:00
Zaid Abdulla
8743cebb01
Fix add_object preset ignoring non-key params
2017-06-26 00:51:53 -07:00
Zaid Abdulla
ae4526defe
Fix expired tasks not getting deleted
2017-06-20 13:54:42 -07:00