Replace potentially ReDOSable regex
Signed-off-by: PandaNinjas <admin@malwarefight.gq>
This commit is contained in:
parent
f36c3a3f6c
commit
d886d32bd8
@ -361,7 +361,7 @@ void InstanceImportTask::processModrinth()
|
||||
} else {
|
||||
QString pack_id;
|
||||
if (!m_sourceUrl.isEmpty()) {
|
||||
QRegularExpression regex(R"(data\/(.*)\/versions)");
|
||||
QRegularExpression regex(R"(data\/([^\/]*)\/versions)");
|
||||
pack_id = regex.match(m_sourceUrl.toString()).captured(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user