Skip to content

Commit 59da290

Browse files
committed
updated readme,tests,fixed regex security issue
1 parent 2dffce2 commit 59da290

File tree

7 files changed

+16
-6
lines changed

7 files changed

+16
-6
lines changed

AppendBlobReader/src/decodeDataChunks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function getBoundaryRegex(serviceBusTask) {
2424
// https://stackoverflow.com/questions/31969913/why-does-this-regexp-exec-cause-an-infinite-loop
2525
var file_ext = String(serviceBusTask.blobName).split(".").pop();
2626
if (file_ext === "json" || file_ext === "blob") {
27-
logRegex = '\{\\s*\"';
27+
logRegex = '{\\s*\"';
2828
}
2929
// uncomment and use the snippet below for overriding boundary regex for your log files
3030
// if (serviceBusTask.storageName === "<your storageAccountName>" || serviceBusTask.containerName === "<your containerName>" ) {

AppendBlobReader/target/consumer_build/AppendBlobTaskConsumer/decodeDataChunks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function getBoundaryRegex(serviceBusTask) {
2424
// https://stackoverflow.com/questions/31969913/why-does-this-regexp-exec-cause-an-infinite-loop
2525
var file_ext = String(serviceBusTask.blobName).split(".").pop();
2626
if (file_ext === "json" || file_ext === "blob") {
27-
logRegex = '\{\\s*\"';
27+
logRegex = '{\\s*\"';
2828
}
2929
// uncomment and use the snippet below for overriding boundary regex for your log files
3030
// if (serviceBusTask.storageName === "<your storageAccountName>" || serviceBusTask.containerName === "<your containerName>" ) {

BlockBlobReader/src/consumer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function regexLastIndexOf(string, regex, startpos) {
141141
*/
142142
function getParseableJsonArray(data, context) {
143143

144-
let logRegex = '\{\\s*\"time\"\:'; // starting regex for nsg logs
144+
let logRegex = '{\\s*\"time\"\:'; // starting regex for nsg logs
145145
let defaultEncoding = "utf8";
146146
let orginalDatalength = data.length;
147147
// If the byte sequence in the buffer data is not valid according to the provided encoding, then it is replaced by the default replacement character i.e. U+FFFD.

BlockBlobReader/target/consumer_build/BlobTaskConsumer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function regexLastIndexOf(string, regex, startpos) {
141141
*/
142142
function getParseableJsonArray(data, context) {
143143

144-
let logRegex = '\{\\s*\"time\"\:'; // starting regex for nsg logs
144+
let logRegex = '{\\s*\"time\"\:'; // starting regex for nsg logs
145145
let defaultEncoding = "utf8";
146146
let orginalDatalength = data.length;
147147
// If the byte sequence in the buffer data is not valid according to the provided encoding, then it is replaced by the default replacement character i.e. U+FFFD.

BlockBlobReader/target/dlqprocessor_build/DLQTaskConsumer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function regexLastIndexOf(string, regex, startpos) {
141141
*/
142142
function getParseableJsonArray(data, context) {
143143

144-
let logRegex = '\{\\s*\"time\"\:'; // starting regex for nsg logs
144+
let logRegex = '{\\s*\"time\"\:'; // starting regex for nsg logs
145145
let defaultEncoding = "utf8";
146146
let orginalDatalength = data.length;
147147
// If the byte sequence in the buffer data is not valid according to the provided encoding, then it is replaced by the default replacement character i.e. U+FFFD.

BlockBlobReader/tests/test_blobreader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_03_func_logs(self):
144144
expected_record_count = {
145145
"blob": 15,
146146
"log": 10,
147-
"json": 10,
147+
"json": 120,
148148
"csv": 12
149149
}
150150
record_count = record_excluded_by_filter_count = record_unsupported_extension_count = None

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ Each integration is structured in three folders
4040

4141
git push origin v<major.minor.patch>
4242

43+
## Security Fixes
44+
package-lock.json can be created using below command
45+
46+
npm install --package-lock
47+
48+
Fix the security dependencies by running below command
49+
50+
npm audit fix
51+
52+
4353

4454
### TLS 1.2 Requirement
4555

0 commit comments

Comments
 (0)