gluon-luci-admin: disable when not in configmode
For security reasons we'd like to disable all HTTP config interfaces when the node is operating normally. This patch disables gluon-luci-admin when configmode is not enabled.
This commit is contained in:
		
							parent
							
								
									5e0048ae84
								
							
						
					
					
						commit
						efc958fbf8
					
				| @ -19,6 +19,11 @@ function index() | |||||||
|   local uci_state = luci.model.uci.cursor_state() |   local uci_state = luci.model.uci.cursor_state() | ||||||
|   local configmode = uci_state:get_first("gluon-config-mode", "wizard", "running", "0") == "1" |   local configmode = uci_state:get_first("gluon-config-mode", "wizard", "running", "0") == "1" | ||||||
| 
 | 
 | ||||||
|  | 	-- Disable gluon-luci-admin when configmode is not enabled | ||||||
|  | 	if not configmode then | ||||||
|  | 		return | ||||||
|  | 	end | ||||||
|  | 
 | ||||||
| 	local root = node() | 	local root = node() | ||||||
| 	if not root.lock then | 	if not root.lock then | ||||||
| 		root.target = alias("admin") | 		root.target = alias("admin") | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user