File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ def set(self, admin_id: int):
9292
9393 """
9494 self ._cookie ["id" ] = admin_id
95- self ._cookie ["ip" ] = self ._request .remote_addr
9695 self .refresh ()
9796
9897 def refresh (self ):
@@ -161,21 +160,16 @@ def _verify_cookie(self):
161160 return
162161
163162 admin_id = self ._cookie .get ("id" , None )
164- remote_addr = self ._cookie .get ("ip" , None )
165163 timestamp = self ._cookie .get ("timestamp" , None )
166164
167- if admin_id is None or remote_addr is None or timestamp is None :
165+ if admin_id is None or timestamp is None :
168166 self .clear ()
169167 return
170168
171169 if not isinstance (admin_id , int ) or not isinstance (timestamp , float ):
172170 self .clear ()
173171 return
174172
175- if remote_addr != self ._request .remote_addr :
176- self .clear ()
177- return
178-
179173 if make_timestamp () - timestamp > config .admin_cookie_duration :
180174 self .clear ()
181175 return
You can’t perform that action at this time.
0 commit comments