Skip to content

Commit 6f15eff

Browse files
committed
JS: Cap length of extracted string
1 parent f813e06 commit 6f15eff

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

javascript/extractor/src/com/semmle/js/extractor/ASTExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ public Label visit(Literal nd, Context c) {
520520
OffsetTranslation offsets = new OffsetTranslation();
521521
offsets.set(0, 1); // skip the initial '/'
522522
regexpExtractor.extract(source.substring(1, source.lastIndexOf('/')), offsets, nd, false);
523-
} else if (nd.isStringLiteral() && !c.isInsideType()) {
523+
} else if (nd.isStringLiteral() && !c.isInsideType() && nd.getRaw().length() < 100) {
524524
regexpExtractor.extract(valueString, makeStringLiteralOffsets(nd.getRaw()), nd, true);
525525
}
526526
return key;

javascript/extractor/src/com/semmle/js/extractor/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class Main {
3737
* A version identifier that should be updated every time the extractor changes in such a way that
3838
* it may produce different tuples for the same file under the same {@link ExtractorConfig}.
3939
*/
40-
public static final String EXTRACTOR_VERSION = "2019-10-23";
40+
public static final String EXTRACTOR_VERSION = "2019-11-17";
4141

4242
public static final Pattern NEWLINE = Pattern.compile("\n");
4343

0 commit comments

Comments
 (0)