equal
deleted
inserted
replaced
549 |
549 |
550 extract($data); |
550 extract($data); |
551 $perms = $session->fetch_page_acl($paste_id, 'Paste'); |
551 $perms = $session->fetch_page_acl($paste_id, 'Paste'); |
552 |
552 |
553 $localhash = false; |
553 $localhash = false; |
|
554 $hash = gorilla_sign($paste_id, $paste_text); |
554 if ( $paste_flags & PASTE_PRIVATE ) |
555 if ( $paste_flags & PASTE_PRIVATE ) |
555 { |
556 { |
556 $localhash = gorilla_sign($paste_id, $paste_text); |
557 $localhash = $hash; |
557 } |
558 } |
558 |
559 |
559 if ( $paste_flags & PASTE_PRIVATE || isset($_GET['delete']) ) |
560 if ( $paste_flags & PASTE_PRIVATE || isset($_GET['delete']) ) |
560 { |
561 { |
561 if ( @$_GET['hash'] !== $localhash ) |
562 if ( @$_GET['hash'] !== $hash ) |
562 { |
563 { |
563 // allow viewing regardless if mod or admin |
564 // allow viewing regardless if mod or admin |
564 if ( !($session->user_level >= USER_LEVEL_MOD && !isset($_GET['delete'])) ) |
565 if ( !($session->user_level >= USER_LEVEL_MOD && !isset($_GET['delete'])) ) |
565 { |
566 { |
566 die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('gorilla_msg_wrong_hash') . '</p>'); |
567 die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('gorilla_msg_wrong_hash') . '</p>'); |