You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
如果使用者在前端輸入 JavaScript 偽協議的內容,雖然編輯器會擋下,若攻擊者知道 API,直接使用打 API 的方式去打,前端收到後端資料直接去顯示還是會有危險,建議前端收到後端資料時還是要做處理,因為可能資料有被更改過,確認 OK 再顯示。
到底要前端做還是後端做,或是全部都做?
如果 Encoding 是後端做,就代表是把資料存進去 DB 前需要做的事情,存的資料是已經處理過的資料,但是會遇到例如: HTML 呈現的載體可能是不一樣的,某段字簡訊寄出,如果編碼過 < 就會變成 <,不是原本想要呈現的內容,所以建議資料庫存的時候,就存資料原始樣子,後端不要特別處理,而是在每個前端,除了網頁還會有其他前端手機等等,在渲染前才去做處理。
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
《Beyond XSS》從 XSS 開始談前端資安 2-1 ~ 2-3
20241031 2-1~2-3
導讀人:Steven
筆記工:Lulu
2-1章節回顧
4.如何在設計中避免破壞 Sanitization 效果的後續處理?
討論:
2-2章節回顧
討論:
2-3章節回顧
問題:
Beta Was this translation helpful? Give feedback.
All reactions