mirror of
				https://github.com/Mibew/tray.git
				synced 2025-10-03 00:03:34 +03:00 
			
		
		
		
	added auth token for delete offline messages check for csrf
This commit is contained in:
		
							parent
							
								
									8abf075e2f
								
							
						
					
					
						commit
						092ebd16ba
					
				| @ -702,7 +702,7 @@ function csrfchecktoken(){ | ||||
| 
 | ||||
|       die("CSRF failure"); | ||||
|     } | ||||
|   } else if($_GET['act'] == 'del' && $_GET['csrf_token'] != $_SESSION['csrf_token']){ | ||||
|   } else if(($_GET['act'] == 'del' || $_GET['act'] == 'delete') && $_GET['csrf_token'] != $_SESSION['csrf_token']){ | ||||
|        | ||||
|     die("CSRF failure"); | ||||
|   } | ||||
|  | ||||
| @ -25,6 +25,8 @@ require_once('../libs/settings.php'); | ||||
| require_once('../libs/groups.php'); | ||||
| require_once('../libs/pagination.php'); | ||||
| 
 | ||||
| csrfchecktoken(); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| loadsettings(); | ||||
| 
 | ||||
|  | ||||
| @ -91,7 +91,7 @@ if( $page['pagination.items'] ) { | ||||
| 		<td> | ||||
| 			<a href="<?php echo $webimroot ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>" target="_blank"  | ||||
| 				onclick="this.newWindow = window.open('<?php echo $webimroot ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("canned.actions.edit") ?></a>, 
 | ||||
| 			<a href="<?php echo $webimroot ?>/operator/canned.php?act=delete&key=<?php echo $localstr['id'] ?>&lang=<?php echo form_value("lang") ?>&group=<?php echo form_value("group")?>"><?php echo getlocal("canned.actions.del") ?></a>
 | ||||
| 			<a href="<?php echo $webimroot ?>/operator/canned.php?act=delete&key=<?php echo $localstr['id'] ?>&lang=<?php echo form_value("lang") ?>&group=<?php echo form_value("group")?><?php print_csrf_token_in_url() ?>"><?php echo getlocal("canned.actions.del") ?></a>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| <?php | ||||
| @ -120,4 +120,4 @@ if( $page['pagination.items'] ) { | ||||
| } /* content */ | ||||
| 
 | ||||
| require_once('inc_main.php'); | ||||
| ?>
 | ||||
| ?>
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user