Skip to content

Commit 486e14b

Browse files
committed
cveRecordSearchModule: add clarification about database used for search; change illegal search characters (remove () = +)
1 parent a01cab9 commit 486e14b

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/assets/data/faqs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
"questionText": "How do I search the CVE List",
273273
"questionResponseParagraphs": [
274274
"<b><i>Search Tips<i></b>",
275-
"<ul><li>By CVE ID<ul><li>Must include only one CVE ID per search.</li><li>CVE ID must include all letters, numbers, and hyphens associated with the CVE ID, e.g., CVE-2024-12345678.</li><li>“CVE” may be entered as “cve”, “CVE”, or as a combination of uppercase and lowercase, as casing is ignored during search.</li></ul></li><li>By other keyword(s)<ul><li>May contain words of alphanumeric characters and certain symbols (i.e., punctuation).<li>Must not contain any of the following symbols: <pre>() {} [] \" ' ` &lt; &gt; + = | ; ! ~ ^ *</pre></li></li><li>May contain one or more keywords, separated by a space.</li><li>Keywords may be entered in lowercase, uppercase, or a combination of both. Casing is ignored during search, e.g., Vulnerabilities, vulnerabilities, VULNERABILITIES.</li></ul></li></ul>"
275+
"<ul><li>By CVE ID<ul><li>Must include only one CVE ID per search.</li><li>CVE ID must include all letters, numbers, and hyphens associated with the CVE ID, e.g., CVE-2024-12345678.</li><li>“CVE” may be entered as “cve”, “CVE”, or as a combination of uppercase and lowercase, as casing is ignored during search.</li></ul></li><li>By other keyword(s)<ul><li>May contain words of alphanumeric characters and certain symbols (i.e., punctuation).<li>Must not contain any of the following symbols: <pre>{} [] \" ' ` &lt; &gt; | ; ! ~ ^ *</pre></li></li><li>May contain one or more keywords, separated by a space.</li><li>Keywords may be entered in lowercase, uppercase, or a combination of both. Casing is ignored during search, e.g., Vulnerabilities, vulnerabilities, VULNERABILITIES.</li></ul></li></ul>"
276276
]
277277
},
278278
{

src/components/cveRecordSearchModule.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,23 @@
88
<font-awesome-icon size="1x" icon="exclamation-triangle" role="alert"
99
aria-labelledby="alertIconVariousFormts" aria-hidden="false" />
1010
</div>
11-
<div class="is-flex-grow-5">
11+
<div v-if="searchTypeBoolean" class="is-flex-grow-5">
1212
<p class="is-size-7">
1313
<span class="has-text-weight-bold">CNAs</span> – to view your <span class="has-text-weight-bold">test data</span>
1414
(your draft records) select “<span class="has-text-weight-bold">Find a Test CVE Record/ID (Legacy)</span>” in the drop-down menu and
1515
provide a CVE ID to find a specific CVE Record.
16+
<br>
17+
<span class="has-text-weight-bold">NOTE for Production Data Search:</span>
18+
The following characters are <span class="has-text-weight-bold">NOT</span>
19+
allowed in search terms:
20+
<span class="is-family-monospace is-size-6">{{ invalidSearchCharacters }}</span>
21+
</p>
22+
</div>
23+
<div v-else class="is-flex-grow-5">
24+
<p class="is-size-6">
25+
You are searching CVE records in the <span class="has-text-weight-bold">TEST</span>
26+
database. Enter <span class="has-text-weight-bold">only ONE</span>
27+
CVE ID.
1628
</p>
1729
</div>
1830
</div>
@@ -79,8 +91,9 @@ const route = useRoute();
7991
const router = useRouter();
8092
8193
const cveRecordRouteName = 'CVERecord';
94+
const invalidSearchCharacters = ref('{}[]"\'`<>|\;!~^*');
8295
const legacyOptionLabel = 'Find a Test CVE Record/ID (Legacy)';
83-
const searchOptionLabel = 'Search CVE List';
96+
const searchOptionLabel = 'Search CVE List (Production Data)';
8497
8598
let queryString = ref('');
8699
@@ -318,7 +331,7 @@ function allValidCharacters(searchString) {
318331
// otherwise. The error message is also set to indicate the invalid
319332
// characters found in the string.
320333
321-
const invalidCharacters = '(){}[]"\'`<>+=|\;!~^*'.split('');
334+
const invalidCharacters = invalidSearchCharacters.value.split('');
322335
323336
const found = invalidCharacters.filter(i => searchString.includes(i));
324337

0 commit comments

Comments
 (0)