Conversation
📝 WalkthroughWalkthroughA new Changes
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/pages/posts/post/PostComponent.vue`:
- Around line 173-176: The PostNud3 export is using post.high_res_file.url first
which bypasses the normalized URL in mediaFile (which strips fragments and
respects selected resolution); update the binding so :mediaUrl prefers
mediaFile.file (the normalized/selected URL) first, then falls back to
post.high_res_file.url and post.low_res_file.url as backups, keeping the
existing v-if that checks mediaFile.file; modify the :mediaUrl expression near
the PostNud3 component accordingly.
- Around line 173-176: The PostNud3 component is unconditionally sending image
URLs to an external service; gate or remove it by using the user's setting from
useUserSettings. Import/use the hook to access blockAiGeneratedImages and update
the PostNud3 render condition (currently checking post.media_type and
mediaFile.file) to also require !blockAiGeneratedImages, e.g. only render
PostNud3 when post.media_type === 'image' && mediaFile.file &&
!blockAiGeneratedImages; alternatively remove the PostNud3 rendering entirely if
consent flow is not implemented.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: af5ab49b-0a4d-48d3-84e8-4ecaedf8c1f7
📒 Files selected for processing (2)
components/pages/posts/post/PostComponent.vuecomponents/pages/posts/post/PostNud3.vue
📜 Review details
🔇 Additional comments (1)
components/pages/posts/post/PostNud3.vue (1)
18-20: Good external-link hardening.Using
target="_blank"withrel="noopener noreferrer"is correct and avoids opener/referrer risks for this outbound link.
| <PostNud3 | ||
| v-if="post.media_type === 'image' && mediaFile.file" | ||
| :mediaUrl="post.high_res_file.url ?? post.low_res_file.url ?? (mediaFile.file as string)" | ||
| /> |
There was a problem hiding this comment.
Use the already-normalized media URL for third-party export.
Line 175 always prefers post.high_res_file.url, which bypasses the selected media resolution path and URL normalization done in mediaFile (fragment stripping). This can unintentionally send a different/higher-res URL to the external service.
Suggested fix
- <PostNud3
- v-if="post.media_type === 'image' && mediaFile.file"
- :mediaUrl="post.high_res_file.url ?? post.low_res_file.url ?? (mediaFile.file as string)"
- />
+ <PostNud3
+ v-if="post.media_type === 'image' && mediaFile.file"
+ :mediaUrl="mediaFile.file as string"
+ />🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@components/pages/posts/post/PostComponent.vue` around lines 173 - 176, The
PostNud3 export is using post.high_res_file.url first which bypasses the
normalized URL in mediaFile (which strips fragments and respects selected
resolution); update the binding so :mediaUrl prefers mediaFile.file (the
normalized/selected URL) first, then falls back to post.high_res_file.url and
post.low_res_file.url as backups, keeping the existing v-if that checks
mediaFile.file; modify the :mediaUrl expression near the PostNud3 component
accordingly.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether a user setting or consent gate already exists for third-party exports.
rg -n -C3 "useUserSettings|consent|third.?party|external|nud3|pornify|ai video|PostNud3"Repository: Rule-34/App
Length of output: 50367
🏁 Script executed:
# Locate and read the PostComponent.vue file
fd -type f "PostComponent.vue" -exec cat {} \;Repository: Rule-34/App
Length of output: 225
🏁 Script executed:
# Locate the PostComponent.vue file
fd "PostComponent.vue"Repository: Rule-34/App
Length of output: 100
🏁 Script executed:
# Read the PostComponent.vue file to examine the PostNud3 component and check for consent gates
cat -n components/pages/posts/post/PostComponent.vue | head -200Repository: Rule-34/App
Length of output: 7350
🏁 Script executed:
# Find the PostNud3 component definition
fd "PostNud3" -type fRepository: Rule-34/App
Length of output: 225
🏁 Script executed:
# Find the PostNud3 component definition
fd "PostNud3"Repository: Rule-34/App
Length of output: 95
🏁 Script executed:
# Read the PostNud3 component to understand what external service it uses
cat -n components/pages/posts/post/PostNud3.vueRepository: Rule-34/App
Length of output: 1076
Remove the unconditional PostNud3 export or add user consent gate.
The PostNud3 component sends image URLs to an external service (nud3.me/pornify) for all eligible image posts without checking user consent. Although the blockAiGeneratedImages setting exists in useUserSettings(), it is not applied to gate this component. Either remove the PostNud3 rendering or add a consent check:
const { blockAiGeneratedImages } = useUserSettings()Then conditionally render:
<PostNud3
v-if="post.media_type === 'image' && mediaFile.file && !blockAiGeneratedImages"
...
/>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@components/pages/posts/post/PostComponent.vue` around lines 173 - 176, The
PostNud3 component is unconditionally sending image URLs to an external service;
gate or remove it by using the user's setting from useUserSettings. Import/use
the hook to access blockAiGeneratedImages and update the PostNud3 render
condition (currently checking post.media_type and mediaFile.file) to also
require !blockAiGeneratedImages, e.g. only render PostNud3 when post.media_type
=== 'image' && mediaFile.file && !blockAiGeneratedImages; alternatively remove
the PostNud3 rendering entirely if consent flow is not implemented.
Summary by CodeRabbit