security: sanitize console.log statements that leak sensitive data
Login responses were serialized as full objects (user_id, subscription, tokens). Track play logs dumped the entire QobuzTrack/Track object which may include signed CDN URLs. Now only log the minimum needed for debugging (success booleans, track id + title). This likely caused the 0x0.st 451 rejection when users tried to upload their console logs for bug reports.
This commit is contained in:
2 files changed
+7
-7
No files matched your search
@@ -106,7 +106,7 @@
|
||||
// NO legacy is_logged_in/get_user_info checks - that causes state divergence.
|
||||
initStatus = 'Initializing...';
|
||||
const status = await invoke<RuntimeStatus>('runtime_bootstrap');
|
||||
console.log('[LoginView] runtime_bootstrap result:', status);
|
||||
console.log('[LoginView] runtime_bootstrap: session_activated =', status.session_activated);
|
||||
|
||||
// Check if session is fully active (authenticated + session activated)
|
||||
if (status.session_activated && status.user_id && status.user_id > 0) {
|
||||
@@ -217,7 +217,7 @@
|
||||
error_code?: string;
|
||||
}>('v2_manual_login', { email, password });
|
||||
|
||||
console.log('[LoginView] v2_manual_login response:', response);
|
||||
console.log('[LoginView] v2_manual_login: success =', response.success);
|
||||
|
||||
if (response.success) {
|
||||
// Validate that we have a valid user_id - NEVER allow 0
|
||||
@@ -307,7 +307,7 @@
|
||||
error_code?: string;
|
||||
}>('v2_start_oauth_login');
|
||||
|
||||
console.log('[LoginView] v2_start_oauth_login response:', response);
|
||||
console.log('[LoginView] v2_start_oauth_login: success =', response.success);
|
||||
|
||||
if (response.success) {
|
||||
if (!response.user_id || response.user_id === 0) {
|
||||
|
||||
@@ -1373,7 +1373,7 @@
|
||||
|
||||
// Playback Functions - QobuzTrack from search results
|
||||
async function handleTrackPlay(track: QobuzTrack) {
|
||||
console.log('Playing track:', track);
|
||||
console.log('Playing track:', track.id, track.title);
|
||||
|
||||
const artwork = track.album?.image?.large || track.album?.image?.thumbnail || track.album?.image?.small || '';
|
||||
const quality = track.hires_streamable && track.maximum_bit_depth && track.maximum_sampling_rate
|
||||
@@ -1399,7 +1399,7 @@
|
||||
|
||||
// Handle track play from album detail view
|
||||
async function handleAlbumTrackPlay(track: Track) {
|
||||
console.log('Playing album track:', track);
|
||||
console.log('Playing album track:', track.id, track.title);
|
||||
|
||||
// ALWAYS create context when playing from an album
|
||||
// The setting only affects menu options visibility, not implicit behavior
|
||||
@@ -2352,7 +2352,7 @@
|
||||
* This is fire-and-forget to match view callback signatures
|
||||
*/
|
||||
function handleDisplayTrackPlay(track: DisplayTrack): void {
|
||||
console.log('Playing display track:', track);
|
||||
console.log('Playing display track:', track.id, track.title);
|
||||
|
||||
// Determine quality string:
|
||||
// - If we have exact bitDepth/samplingRate, show them
|
||||
@@ -2408,7 +2408,7 @@
|
||||
}
|
||||
|
||||
async function handleLocalTrackPlay(track: LocalLibraryTrack) {
|
||||
console.log('Playing local track:', track);
|
||||
console.log('Playing local track:', track.id, track.title);
|
||||
// DO NOT clear context - LocalLibraryView already sets it correctly
|
||||
// await clearPlaybackContext();
|
||||
|
||||
|
||||
Reference in new issue
Block a user