Skip to content

Commit be5edf1

Browse files
committed
Fix invalid form bug
1 parent 5096a4c commit be5edf1

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

controller/main.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private function display_pb()
233233
switch ($mode)
234234
{
235235
case 'edit_snippet':
236-
if (!check_form_key('phpbbde_pastebin_editform'))
236+
if (!check_form_key('pastebinform'))
237237
{
238238
trigger_error('PASTEBIN_FORM_INVALID');
239239
}
@@ -252,7 +252,7 @@ private function display_pb()
252252

253253
$message = $this->language->lang('PASTEBIN_SNIPPET_MODERATED');
254254
$message .= '<br /><br />';
255-
$message .= $this->language->lang('PASTEBIN_RETURN_' . ((!$delete) ? 'SNIPPET' : 'PASTEBIN'), '<a href="' . $redirect_url . '">', '</a>');
255+
$message .= $this->language->lang('PASTEBIN_RETURN_SNIPPET', '<a href="' . $redirect_url . '">', '</a>');
256256

257257
meta_refresh(3, $redirect_url);
258258
trigger_error($message);
@@ -627,7 +627,6 @@ private function display_pb()
627627
$is_recaptcha = strpos($captcha_in_use, 'recaptcha');
628628

629629
add_form_key('pastebinform');
630-
add_form_key('phpbbde_pastebin_editform');
631630

632631
$this->template->assign_vars(array(
633632
'SNIPPET_TITLE' => isset($data['snippet_title']) ? $data['snippet_title'] : '',

language/de/permissions_pastebin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
'ACL_U_PASTEBIN_POST' => 'Kann Snippets posten',
4343
'ACL_U_PASTEBIN_POST_NOVC' => 'Kann Snippets posten ohne visuelle Bestätigung',
4444
'ACL_U_PASTEBIN_POST_NOTLIM' => 'Kann Snippets dauerhaft in den Pastebin einstellen',
45-
'ACL_U_PASTEBIN_EDIT' => 'Kann eigene Snippets bearbeiten (Speicherdauer, Syntaxhervorhebung)',
45+
'ACL_U_PASTEBIN_EDIT' => 'Kann eigene Snippets bearbeiten (Speicherdauer, Syntaxhervorhebung, Quellcode)',
4646
'ACL_U_PASTEBIN_DELETE' => 'Kann eigene Snippets löschen',
4747

4848
// Moderator perms,
49-
'ACL_M_PASTEBIN_EDIT' => 'Kann Snippets editieren (Speicherdauer, Syntaxhervorhebung)',
49+
'ACL_M_PASTEBIN_EDIT' => 'Kann Snippets editieren (Speicherdauer, Syntaxhervorhebung, Quellcode)',
5050
'ACL_M_PASTEBIN_DELETE' => 'Kann Snippets löschen',
5151
'ACL_M_PASTEBIN_POST_NOTLIM' => 'Kann die automatische Löschung von Snippets deaktivieren',
5252
));

language/en/permissions_pastebin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
'ACL_U_PASTEBIN_POST' => 'Can post pastebin entries',
4343
'ACL_U_PASTEBIN_POST_NOVC' => 'Can post pastebin entries without visual confirmation',
4444
'ACL_U_PASTEBIN_POST_NOTLIM' => 'Can post non-pruned pastebin entries',
45-
'ACL_U_PASTEBIN_EDIT' => 'Can edit own pastebin entries (Storage duration, Syntax highlighting)',
45+
'ACL_U_PASTEBIN_EDIT' => 'Can edit own pastebin entries (Storage duration, Syntax highlighting, Source code)',
4646
'ACL_U_PASTEBIN_DELETE' => 'Can delete own pastebin entries',
4747

4848
// Moderator perms
49-
'ACL_M_PASTEBIN_EDIT' => 'Can edit pastebin entries (Storage duration, Syntax highlighting)',
49+
'ACL_M_PASTEBIN_EDIT' => 'Can edit pastebin entries (Storage duration, Syntax highlighting, Source code)',
5050
'ACL_M_PASTEBIN_DELETE' => 'Can delete pastebin entries',
5151
'ACL_M_PASTEBIN_POST_NOTLIM' => 'Can deactivate pruning of selected pastebin entries',
5252
));

0 commit comments

Comments
 (0)