def change_user_cookie_security(secure, remember):
 if secure:
  set_secure_session_cookie(remember)
 else:
  delete_secure_session_cookie()
 if (not c.user_is_loggedin):
  return
 user_name = c.user.name
 securable = (PRIVATE_SESSION_COOKIES + [((user_name + '_') + c_name) for c_name in PRIVATE_USER_COOKIES])
 for (name, cookie) in c.cookies.iteritems():
  if (name in securable):
   cookie.secure = secure
   if (name in PRIVATE_SESSION_COOKIES):
    if (name != '_options'):
     cookie.httponly = True
    if (remember and (name == g.login_cookie)):
     cookie.expires = NEVER
   cookie.dirty = True

def change_user_cookie_security ( secure , remember ) : if secure : set_secure_session_cookie ( remember ) else : delete_secure_session_cookie ( ) if ( not c . user_is_loggedin ) : return user_name = c . user . name securable = ( PRIVATE_SESSION_COOKIES + [ ( ( user_name + '_' ) + c_name ) for c_name in PRIVATE_USER_COOKIES ] ) for ( name , cookie ) in c . cookies . iteritems ( ) : if ( name in securable ) : cookie . secure = secure if ( name in PRIVATE_SESSION_COOKIES ) : if ( name != '_options' ) : cookie . httponly = True if ( remember and ( name == g . login_cookie ) ) : cookie . expires = NEVER cookie . dirty = True
mark a users cookies as either secure or insecure .