RoyAalekh commited on
Commit
fd93c1d
·
1 Parent(s): d80d0d5

Security: remove sensitive key information from logs

Browse files
Files changed (5) hide show
  1. static/index.html +2 -2
  2. static/map.html +2 -2
  3. static/sw.js +1 -1
  4. supabase_client.py +2 -11
  5. version.json +1 -1
static/index.html CHANGED
@@ -947,7 +947,7 @@
947
  // Force refresh if we detect cached version
948
  (function() {
949
  const currentVersion = '5.1.1';
950
- const timestamp = '1762279479'; // Cache-busting bump
951
  const lastVersion = sessionStorage.getItem('treetrack_version');
952
  const lastTimestamp = sessionStorage.getItem('treetrack_timestamp');
953
 
@@ -1193,7 +1193,7 @@
1193
  </div>
1194
  </div>
1195
 
1196
- <script type="module" src="/static/js/tree-track-app.js?v=5.1.1&t=1762279479"></script>
1197
 
1198
  <script>
1199
  // Idle-time prefetch of map assets to speed up first navigation
 
947
  // Force refresh if we detect cached version
948
  (function() {
949
  const currentVersion = '5.1.1';
950
+ const timestamp = '1762279604'; // Cache-busting bump
951
  const lastVersion = sessionStorage.getItem('treetrack_version');
952
  const lastTimestamp = sessionStorage.getItem('treetrack_timestamp');
953
 
 
1193
  </div>
1194
  </div>
1195
 
1196
+ <script type="module" src="/static/js/tree-track-app.js?v=5.1.1&t=1762279604"></script>
1197
 
1198
  <script>
1199
  // Idle-time prefetch of map assets to speed up first navigation
static/map.html CHANGED
@@ -968,7 +968,7 @@
968
  // Force refresh if we detect cached version
969
  (function() {
970
  const currentVersion = '5.1.1';
971
- const timestamp = '1762279479'; // Current timestamp for cache busting
972
  const lastVersion = sessionStorage.getItem('treetrack_version');
973
  const lastTimestamp = sessionStorage.getItem('treetrack_timestamp');
974
 
@@ -1137,7 +1137,7 @@ const timestamp = '1762279479'; // Current timestamp for cache busting
1137
  <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
1138
  <!-- Leaflet MarkerCluster JS for performance and grouping -->
1139
  <script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"></script>
1140
- <script src="/static/map.js?v=5.1.1&t=1762279479"></script>
1141
  <script>
1142
  console.log('🗺️ Map script loaded successfully');
1143
  </script>
 
968
  // Force refresh if we detect cached version
969
  (function() {
970
  const currentVersion = '5.1.1';
971
+ const timestamp = '1762279604'; // Current timestamp for cache busting
972
  const lastVersion = sessionStorage.getItem('treetrack_version');
973
  const lastTimestamp = sessionStorage.getItem('treetrack_timestamp');
974
 
 
1137
  <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
1138
  <!-- Leaflet MarkerCluster JS for performance and grouping -->
1139
  <script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"></script>
1140
+ <script src="/static/map.js?v=5.1.1&t=1762279604"></script>
1141
  <script>
1142
  console.log('🗺️ Map script loaded successfully');
1143
  </script>
static/sw.js CHANGED
@@ -1,5 +1,5 @@
1
  // TreeTrack Service Worker - PWA and Offline Support
2
- const VERSION = 1762279479; // Cache busting bump - force clients to fetch new static assets and header image change
3
  const CACHE_NAME = `treetrack-v${VERSION}`;
4
  const STATIC_CACHE = `static-v${VERSION}`;
5
  const API_CACHE = `api-v${VERSION}`;
 
1
  // TreeTrack Service Worker - PWA and Offline Support
2
+ const VERSION = 1762279604; // Cache busting bump - force clients to fetch new static assets and header image change
3
  const CACHE_NAME = `treetrack-v${VERSION}`;
4
  const STATIC_CACHE = `static-v${VERSION}`;
5
  const API_CACHE = `api-v${VERSION}`;
supabase_client.py CHANGED
@@ -135,23 +135,14 @@ def create_storage_buckets():
135
 
136
  # Test connection
137
  def test_supabase_connection() -> bool:
138
- """Test Supabase connection with detailed debugging"""
139
  try:
140
- logger.info(f"Testing connection to: {SUPABASE_URL}")
141
- logger.info(f"Using anon key (first 20 chars): {SUPABASE_ANON_KEY[:20]}...")
142
-
143
  client = get_supabase_client()
144
-
145
- # Try a simple REST API call first
146
- logger.info("Attempting to connect to Supabase REST API...")
147
-
148
- # Try to query the trees table (will create it if it doesn't exist)
149
  result = client.table('trees').select("id").limit(1).execute()
150
  logger.info("Supabase connection successful")
151
  return True
152
 
153
  except Exception as e:
154
  logger.error(f"Supabase connection failed: {type(e).__name__}: {e}")
155
- logger.error(f"URL: {SUPABASE_URL}")
156
- logger.error(f"Key type: {type(SUPABASE_ANON_KEY)}, Length: {len(SUPABASE_ANON_KEY) if SUPABASE_ANON_KEY else 0}")
157
  return False
 
135
 
136
  # Test connection
137
  def test_supabase_connection() -> bool:
138
+ """Test Supabase connection"""
139
  try:
140
+ logger.info("Testing Supabase connection...")
 
 
141
  client = get_supabase_client()
 
 
 
 
 
142
  result = client.table('trees').select("id").limit(1).execute()
143
  logger.info("Supabase connection successful")
144
  return True
145
 
146
  except Exception as e:
147
  logger.error(f"Supabase connection failed: {type(e).__name__}: {e}")
 
 
148
  return False
version.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
  "version": "5.1.1",
3
- "timestamp": 1762279479
4
  }
 
1
  {
2
  "version": "5.1.1",
3
+ "timestamp": 1762279604
4
  }