BrianIsaac commited on
Commit
a369aa6
·
1 Parent(s): d70f0b1

fix: clear portfolio input and dropdown on logout to prevent data leakage

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -3156,6 +3156,9 @@ Please try again with different parameters.
3156
  # Clear password reset modals
3157
  gr.update(visible=False), # password_reset_modal
3158
  gr.update(visible=False), # password_update_modal
 
 
 
3159
  )
3160
 
3161
  def sync_login(email: str, password: str, current_session: Dict):
@@ -3323,7 +3326,8 @@ Please try again with different parameters.
3323
  logout_btn, sidebar, results_page, loading_page, history_page,
3324
  analysis_output, allocation_plot, risk_plot, performance_plot,
3325
  correlation_plot, optimization_plot, history_table,
3326
- password_reset_modal, password_update_modal
 
3327
  ]
3328
  )
3329
 
@@ -3351,7 +3355,8 @@ Please try again with different parameters.
3351
  logout_btn, sidebar, results_page, loading_page, history_page,
3352
  analysis_output, allocation_plot, risk_plot, performance_plot,
3353
  correlation_plot, optimization_plot, history_table,
3354
- password_reset_modal, password_update_modal
 
3355
  ]
3356
  )
3357
 
 
3156
  # Clear password reset modals
3157
  gr.update(visible=False), # password_reset_modal
3158
  gr.update(visible=False), # password_update_modal
3159
+ # Clear user input data (SECURITY: prevent data leakage)
3160
+ gr.update(value=""), # portfolio_input
3161
+ gr.update(choices=[], value=None), # load_past_portfolio_dropdown
3162
  )
3163
 
3164
  def sync_login(email: str, password: str, current_session: Dict):
 
3326
  logout_btn, sidebar, results_page, loading_page, history_page,
3327
  analysis_output, allocation_plot, risk_plot, performance_plot,
3328
  correlation_plot, optimization_plot, history_table,
3329
+ password_reset_modal, password_update_modal,
3330
+ portfolio_input, load_past_portfolio_dropdown
3331
  ]
3332
  )
3333
 
 
3355
  logout_btn, sidebar, results_page, loading_page, history_page,
3356
  analysis_output, allocation_plot, risk_plot, performance_plot,
3357
  correlation_plot, optimization_plot, history_table,
3358
+ password_reset_modal, password_update_modal,
3359
+ portfolio_input, load_past_portfolio_dropdown
3360
  ]
3361
  )
3362