Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMB alert update 7.0 #1110

Merged
merged 5 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Main changes compared to 7.0.3:
* An issue with handling XRef URLs without scheme prefix has been addressed.
* Various small usability improvements for the auth config page, empty list
pages and the "Edit filter" icons.
* Tags can now contain backslashes in the value and hyphens in the name
to allow using the special "smb-alert:file_path" task tag.


gsa 7.0.3 (2018-03-28)
Expand Down
4 changes: 2 additions & 2 deletions src/gsad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,8 +1464,8 @@ init_validator ()
openvas_validator_add (validator, "subject_type", "^(group|role|user)$");
openvas_validator_add (validator, "summary", "^.{0,400}$");
openvas_validator_add (validator, "tag_id", "^[a-z0-9\\-]+$");
openvas_validator_add (validator, "tag_name", "^[\\:-_[:alnum:], \\./]{1,80}$");
openvas_validator_add (validator, "tag_value", "^[\\-_@[:alnum:], \\./]{0,200}$");
openvas_validator_add (validator, "tag_name", "^[\\:\\-_[:alnum:], \\./]{1,80}$");
openvas_validator_add (validator, "tag_value", "^[\\-_@[:alnum:], \\.\\\\]{0,200}$");
openvas_validator_add (validator, "target_id", "^[a-z0-9\\-]+$");
openvas_validator_add (validator, "task_id", "^[a-z0-9\\-]+$");
openvas_validator_add (validator, "term", "^.{0,1000}");
Expand Down
1 change: 1 addition & 0 deletions src/gsad_omp.c
Original file line number Diff line number Diff line change
Expand Up @@ -8175,6 +8175,7 @@ append_alert_method_data (GString *xml, params_t *data, const char *method,
|| (strcmp (method, "SMB") == 0
&& (strcmp (name, "smb_credential") == 0
|| strcmp (name, "smb_file_path") == 0
|| strcmp (name, "smb_file_path_type") == 0
|| strcmp (name, "smb_report_format") == 0
|| strcmp (name, "smb_share_path") == 0))
|| (strcmp (method, "SNMP") == 0
Expand Down
34 changes: 34 additions & 0 deletions src/html/classic/omp.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10841,6 +10841,16 @@ was created or assigned erroneously.
<div class="form-group form-selection-item-method form-selection-item-method--smb">
<label class="col-2 control-label"><xsl:value-of select="gsa:i18n ('File path')"/></label>
<div class="col-10">
<div class="form-item radio">
<label class="radio-inline">
<input type="radio" name="method_data:smb_file_path_type" value="directory"/>
<xsl:value-of select="gsa:i18n ('Directory')"/>
</label>
<label class="radio-inline">
<input type="radio" name="method_data:smb_file_path_type" value="full" checked="1"/>
<xsl:value-of select="gsa:i18n ('Full path')"/>
</label>
</div>
<div class="form-item">
<input type="text" name="method_data:smb_file_path"
class="form-control"
Expand Down Expand Up @@ -12292,6 +12302,30 @@ was created or assigned erroneously.
<div class="form-group form-selection-item-method form-selection-item-method--smb">
<label class="col-2 control-label"><xsl:value-of select="gsa:i18n ('File Path')"/></label>
<div class="col-10">
<div class="form-item radio">
<label class="radio-inline">
<xsl:choose>
<xsl:when test="$method/data[name='smb_file_path_type']/text() = 'directory'">
<input type="radio" name="method_data:smb_file_path_type" value="directory" checked="1"/>
</xsl:when>
<xsl:otherwise>
<input type="radio" name="method_data:smb_file_path_type" value="directory"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="gsa:i18n ('Directory')"/>
</label>
<label class="radio-inline">
<xsl:choose>
<xsl:when test="not ($method/data[name='smb_file_path_type']/text() != 'full')">
<input type="radio" name="method_data:smb_file_path_type" value="full" checked="1"/>
</xsl:when>
<xsl:otherwise>
<input type="radio" name="method_data:smb_file_path_type" value="full"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="gsa:i18n ('Full path')"/>
</label>
</div>
<div class="form-item">
<input name="method_data:smb_file_path"
class="form-control"
Expand Down