mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-05-25 14:29:25 +08:00
modified 修复权限放大带来的URL漏洞!
This commit is contained in:
parent
ae4cbd8e50
commit
69e8b7139c
@ -51,8 +51,8 @@ class Base extends Controller {
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
protected function _prepareTemplate( $temp ){
|
protected function _prepareTemplate( $temp ){
|
||||||
|
$MenuInfo = Menu::where([])->column('hide','url');
|
||||||
if( !isAdministrator() ){
|
if( !isAdministrator() ){
|
||||||
$MenuInfo = Menu::where([])->column('hide','url');
|
|
||||||
$authList = (new \Permission())->getAuthList($this->uid);
|
$authList = (new \Permission())->getAuthList($this->uid);
|
||||||
switch ( $temp['tempType'] ){
|
switch ( $temp['tempType'] ){
|
||||||
case 'table':
|
case 'table':
|
||||||
@ -84,6 +84,21 @@ class Base extends Controller {
|
|||||||
case 'form':
|
case 'form':
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
switch ( $temp['tempType'] ){
|
||||||
|
case 'table':
|
||||||
|
foreach ( $temp['topButton'] as $key => $value ){
|
||||||
|
$temp['topButton'][$key]['href'] = url($value['href']);
|
||||||
|
}
|
||||||
|
$temp['topButton'] = array_values($temp['topButton']);
|
||||||
|
foreach ( $temp['rightButton'] as $k => $v ){
|
||||||
|
$temp['rightButton'][$k]['href'] = url($v['href']);
|
||||||
|
}
|
||||||
|
$temp['rightButton'] = array_values($temp['rightButton']);
|
||||||
|
break;
|
||||||
|
case 'form':
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $temp;
|
return $temp;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user