aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/confirm-action.html.tmpl
blob: 6dda0d0141e4ca8a423e533e04133200f93c05a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[%# INTERFACE:
  # abuser: identity of the user who created the (invalid?) token.
  # token_action: the action the token was supposed to serve.
  # expected_action: the action the user was going to do.
  # script_name: the script generating this warning.
  # alternate_script: the suggested script to redirect the user to
  #                   if they decline submission.
  #%]

[% PROCESS global/header.html.tmpl
  title = "Suspicious Action"
%]

[% IF abuser %]
  <div class="throw_error">
    <p>When you view an administrative form in Bugzilla, a token string
    is randomly generated and stored both in the database and in the form you loaded,
    to make sure that the requested changes are being made as a result of submitting
    a form generated by Bugzilla. Unfortunately, the token used right now
    is incorrect, meaning that it looks like you didn't come from the right page.
    The following token has been used :</p>

    [% IF token_action != expected_action %]
      <p>
        <span class="label">Action&nbsp;stored:</span>
        [%+ token_action FILTER html %]
        <br>
        This action doesn't match the one expected ([% expected_action FILTER html %]).
      </p>
    [% END %]

    [% IF abuser != user.identity %]
      <p>
        <span class="label">Generated&nbsp;by:</span>
        [%+ abuser FILTER html %]
        <br>
        This token has not been generated by you. It is possible that someone
        tried to trick you!
      </p>
    [% END %]
  </div>

  <p>Please report this problem to [% Param("maintainer") FILTER html %].</p>
[% ELSE %]
  <div class="throw_error">
    It looks like you didn't come from the right page (you have no valid token for
    the <em>[% expected_action FILTER html %]</em> action while processing the
    '[% script_name FILTER html%]' script). The reason could be one of:<br>
    <ul>
      <li>You clicked the "Back" button of your web browser after having successfully
      submitted changes, which is generally not a good idea (but harmless).</li>
      <li>You entered the URL in the address bar of your web browser directly,
      which should be safe.</li>
      <li>You clicked on a URL which redirected you here <b>without your consent</b>,
      in which case this action is much more critical.</li>
    </ul>
    Are you sure you want to commit these changes anyway? This may result in
    unexpected and undesired results.
  </div>

  <form name="check" id="check" method="post" action="[% script_name FILTER html %]">
    [% PROCESS "global/hidden-fields.html.tmpl"
               exclude="^(Bugzilla_login|Bugzilla_password)$" %]
    <input type="submit" id="confirm" value="Confirm Changes">
  </form>
  <p>Or throw away these changes and go back to <a href="[% alternate_script FILTER html %]">
    [%- alternate_script FILTER html %]</a>.</p>
[% END %]

[% PROCESS global/footer.html.tmpl %]