|
1 | 1 | @model ReportAbuseViewModel |
2 | 2 | @{ |
3 | | - ViewBag.Title = "Report Abuse by " + Model.PackageId + " " + Model.PackageVersion; |
| 3 | + ViewBag.Title = "Report Package " + Model.PackageId + " " + Model.PackageVersion; |
4 | 4 | ViewBag.MdPageColumns = GalleryConstants.ColumnsFormMd; |
5 | 5 | string returnUrl = ViewData.ContainsKey(GalleryConstants.ReturnUrlViewDataKey) ? (string)ViewData[GalleryConstants.ReturnUrlViewDataKey] : Request.RawUrl; |
6 | 6 | } |
|
9 | 9 | <div class="row report-form"> |
10 | 10 | <div class="@ViewHelpers.GetColumnClasses(ViewBag)"> |
11 | 11 | @Html.Partial( |
12 | | - "_PackageHeading", |
| 12 | + "_PackageHeading", |
13 | 13 | new PackageHeadingModel( |
14 | | - Model.PackageId, |
15 | | - Model.PackageVersion, |
16 | | - "Report abuse")) |
| 14 | + Model.PackageId, |
| 15 | + Model.PackageVersion, |
| 16 | + "Report package")) |
17 | 17 |
|
| 18 | + <h2><strong>If this package has a bug/failed to install</strong></h2> |
18 | 19 | @ViewHelpers.AlertWarning(isAlertRole: true, htmlContent: |
19 | 20 | @<text> |
20 | | - <strong>Important - Please do not use this form to report a bug in a package you are using!</strong><br /> |
21 | | - This form is for reporting abusive packages such as |
22 | | - packages containing malicious code or spam. If "@Model.PackageId" simply doesn't |
23 | | - work, or if you need help getting the package installed, please |
| 21 | + Please do not report using the form below - that is reserved for abusive packages, such as those containing malicious code or spam. |
| 22 | + <br /> |
| 23 | + <br /> |
| 24 | + If "@Model.PackageId" simply doesn't work, or if you need help getting the package installed, please |
24 | 25 | <a href="@Url.ContactOwners(Model)" title="contact the owners">contact the owners instead.</a> |
25 | 26 | </text> |
26 | 27 | ) |
27 | 28 |
|
28 | | - <p tabindex="0"> |
29 | | - Please provide a detailed abuse report with evidence to support your claim! We cannot delete packages without evidence that they exhibit malicious behavior. |
30 | | - </p> |
| 29 | + <h2><strong>To report a security vulnerability</strong></h2> |
| 30 | + @ViewHelpers.AlertWarning(isAlertRole: true, htmlContent: |
| 31 | + @<text> |
| 32 | + Please report security vulnerabilities through the <a href="https://msrc.microsoft.com/create-report" title="report a security vulnerability">official portal</a>. |
| 33 | + If this is not a Microsoft - owned package, consider also <a href="@Url.ContactOwners(Model)" title="contact the owners">contacting the owners</a>. |
| 34 | + </text> |
| 35 | + ) |
31 | 36 |
|
| 37 | + <h2><strong>To report abuse, use this form</strong></h2> |
32 | 38 | @if (!Model.ConfirmedUser) |
33 | 39 | { |
34 | | - <p tabindex="0"> |
35 | | - Note: If this is your package and you would like to contact support, please |
36 | | - <a href="@Url.LogOn(returnUrl)">sign in.</a> |
37 | | - </p> |
| 40 | + @ViewHelpers.AlertWarning(isAlertRole: true, htmlContent: |
| 41 | + @<text> |
| 42 | + If this is your package, please <a href="@Url.LogOn(returnUrl)">sign in</a> to contact support. |
| 43 | + </text> |
| 44 | + ) |
38 | 45 | } |
| 46 | + <p tabindex="0"> |
| 47 | + <text> |
| 48 | + Please provide a detailed abuse report with evidence to support your claim! We cannot delete packages without evidence that they exhibit malicious behavior. |
| 49 | + </text> |
| 50 | + </p> |
| 51 | + |
39 | 52 | @using (Html.BeginForm()) |
40 | 53 | { |
41 | 54 | @Html.AntiForgeryToken() |
42 | 55 |
|
43 | 56 | <div id="form-field-reason" class="form-group @Html.HasErrorFor(m => m.Reason)"> |
44 | 57 | @Html.ShowLabelFor(m => m.Reason) |
45 | | - <p tabindex="0">Please select the reason for contacting support about this package.</p> |
| 58 | + <p tabindex="0">Please select the reason for contacting support about this package. This package contains:</p> |
46 | 59 | @Html.ShowEnumDropDownListFor(m => m.Reason, Model.ReasonChoices, "<Choose a Reason>") |
47 | 60 | @Html.ShowValidationMessagesFor(m => m.Reason) |
48 | 61 | </div> |
49 | 62 |
|
| 63 | + <div class="reason-error-has-a-bug" tabindex="0"> |
| 64 | + <p> |
| 65 | + Unfortunately we cannot provide support for bugs in NuGet packages. Please <a href="@Url.ContactOwners(Model)" title="contact the owners">contact the owners</a> for assistance. |
| 66 | + </p> |
| 67 | + </div> |
| 68 | + <div class="reason-error-security-vulnerability" tabindex="0"> |
| 69 | + <p> |
| 70 | + Please report security vulnerabilities through the <a href="https://msrc.microsoft.com/create-report" title="report a security vulnerability">official portal</a>. |
| 71 | + If this is not a Microsoft - owned package, consider also <a href="@Url.ContactOwners(Model)" title="contact the owners">contacting the owners</a>. |
| 72 | + </p> |
| 73 | + </div> |
50 | 74 | <div id="report-abuse-form"> |
51 | 75 | <div class="form-group @Html.HasErrorFor(m => m.Email)"> |
52 | 76 | @Html.ShowLabelFor(m => m.Email) |
|
73 | 97 | Note: Please complete this form and submit it so we can proceed with an appropriate response regarding the NuGet package (e.g. removing it). In addition, please proceed to <a href="https://report.cybertip.org">https://report.cybertip.org</a> to report the matter in more detail. |
74 | 98 | </p> |
75 | 99 | </div> |
76 | | - <div class="terrorism-or-violent-extremism" tabindex="0"> |
77 | | - <p> |
78 | | - Note: Please complete this form and submit it so we can proceed with an appropriate response regarding the NuGet package (e.g. removing it). In addition, please proceed to <a href="https://www.microsoft.com/en-au/concern/terroristcontent">https://www.microsoft.com/en-au/concern/terroristcontent</a> to report the matter in more detail. |
79 | | - </p> |
80 | | - </div> |
81 | 100 | <div class="imminent-harm" tabindex="0"> |
82 | 101 | <p> |
83 | 102 | Note: please ensure when reporting this type of abuse that you've considered whether the following are present: |
|
89 | 108 | </ul> |
90 | 109 | </p> |
91 | 110 | </div> |
92 | | - <div class="revenge-porn" tabindex="0"> |
93 | | - <p> |
94 | | - Note: Please complete this form and submit it so we can proceed with an appropriate response regarding the NuGet package (e.g. removing it). In addition, please proceed to <a href="https://www.microsoft.com/en-us/concern/revengeporn">https://www.microsoft.com/en-us/concern/revengeporn</a> to report the matter in more detail. |
95 | | - </p> |
96 | | - </div> |
97 | 111 | @Html.ShowTextAreaFor(m => m.Message, 10, 50) |
98 | 112 | @Html.ShowValidationMessagesFor(m => m.Message) |
99 | 113 | </div> |
|
139 | 153 | $form.validate().element($('#Reason')); |
140 | 154 | } |
141 | 155 |
|
142 | | - if (val === 'HasABugOrFailedToInstall') { |
| 156 | + // For error conditions, hide the other form fields and show error messages |
| 157 | + if (val === 'HasABugOrFailedToInstall' |
| 158 | + || val === 'ContainsSecurityVulnerability') { |
143 | 159 | $('#report-abuse-form').hide(); |
144 | 160 | } else { |
145 | 161 | $('#report-abuse-form').show(); |
146 | 162 | } |
147 | 163 |
|
| 164 | + if (val === 'HasABugOrFailedToInstall') { |
| 165 | + $form.find('.reason-error-has-a-bug').show(); |
| 166 | + } else { |
| 167 | + $form.find('.reason-error-has-a-bug').hide(); |
| 168 | + } |
| 169 | +
|
| 170 | + if (val === 'ContainsSecurityVulnerability') { |
| 171 | + $form.find('.reason-error-security-vulnerability').show(); |
| 172 | + } else { |
| 173 | + $form.find('.reason-error-security-vulnerability').hide(); |
| 174 | + } |
| 175 | +
|
148 | 176 | // We don't suggest the customer contact the owner in the case of safety violations |
149 | 177 | if (val === 'ChildSexualExploitationOrAbuse' |
150 | 178 | || val === 'TerrorismOrViolentExtremism' |
|
163 | 191 | $form.find('.child-sexual-exploitation').hide(); |
164 | 192 | } |
165 | 193 |
|
166 | | - if (val === 'TerrorismOrViolentExtremism') { |
167 | | - $form.find('.terrorism-or-violent-extremism').show(); |
168 | | - } else { |
169 | | - $form.find('.terrorism-or-violent-extremism').hide(); |
170 | | - } |
171 | | -
|
172 | 194 | if (val === 'ImminentHarm') { |
173 | 195 | $form.find('.imminent-harm').show(); |
174 | 196 | } else { |
175 | 197 | $form.find('.imminent-harm').hide(); |
176 | 198 | } |
177 | 199 |
|
178 | | - if (val === 'RevengePorn') { |
179 | | - $form.find('.revenge-porn').show(); |
180 | | - } else { |
181 | | - $form.find('.revenge-porn').hide(); |
182 | | - } |
183 | | -
|
184 | 200 | if (val == 'ViolatesALicenseIOwn') { |
185 | 201 | $form.find('.infringement-claim-requirements').show(); |
186 | 202 | $('#Signature').rules("add", { |
|
0 commit comments