Browse Source

fix(issues): Add statement to restrict java stacktrace link API calls (#42238)

Add statement to restrict java stacktrace link API calls to only frames
with com in it

Fixes WOR-2496

Co-authored-by: Scott Cooper <scttcper@gmail.com>
Jodi Jang 2 years ago
parent
commit
e3c1c53d2e
1 changed files with 14 additions and 9 deletions
  1. 14 9
      static/app/components/events/interfaces/frame/context.tsx

+ 14 - 9
static/app/components/events/interfaces/frame/context.tsx

@@ -76,15 +76,20 @@ const Context = ({
 
   // Temporarily allow mobile platforms to make API call and "show" stacktrace link
   if (isMobile) {
-    return (
-      <ErrorBoundary customComponent={null}>
-        <StacktraceLink
-          line={frame.function ? frame.function : ''}
-          frame={frame}
-          event={event}
-        />
-      </ErrorBoundary>
-    );
+    if (
+      event.platform !== 'java' ||
+      (event.platform === 'java' && frame?.module?.startsWith('com.'))
+    ) {
+      return (
+        <ErrorBoundary customComponent={null}>
+          <StacktraceLink
+            line={frame.function ? frame.function : ''}
+            frame={frame}
+            event={event}
+          />
+        </ErrorBoundary>
+      );
+    }
   }
 
   const contextLines = isExpanded