mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 12:10:57 +00:00
Sanitize print logs; refactor popular plugin logic
Ensure printed output and HTML logs are safe by importing and applying sanitize_string, opening log files with utf-8 and errors='replace', and sanitizing text before writing. Add tests to verify lone surrogate characters are replaced and that logging won't crash on invalid Unicode. In the plugin installer UI, introduce POPULAR_PLUGIN_MIN_STARS and centralize popularity checking in _isPopularPlugin, using it for filtering and counts.
This commit is contained in:
parent
430f8479a9
commit
44e008745d
6 changed files with 272 additions and 11 deletions
|
|
@ -124,6 +124,12 @@
|
|||
</div>
|
||||
|
||||
<div class="pi-card-bubbles pi-card-bubbles-status">
|
||||
<template x-if="plugin.suspended">
|
||||
<span class="pi-card-bubble pi-card-bubble-suspended">
|
||||
<span class="material-symbols-outlined">priority_high</span>
|
||||
<span class="pi-card-bubble-text">Suspended</span>
|
||||
</span>
|
||||
</template>
|
||||
<template x-if="plugin.installed">
|
||||
<span class="pi-card-bubble pi-card-bubble-installed">
|
||||
<span class="material-symbols-outlined">check_circle</span>
|
||||
|
|
@ -641,6 +647,19 @@
|
|||
border-color: rgba(59, 130, 246, 0.3);
|
||||
}
|
||||
|
||||
.pi-card-bubble-suspended .material-symbols-outlined {
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.pi-card-bubble-suspended .pi-card-bubble-text {
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.pi-card-bubble-suspended:hover {
|
||||
background: rgba(245, 158, 11, 0.12);
|
||||
border-color: rgba(245, 158, 11, 0.35);
|
||||
}
|
||||
|
||||
body.light-mode .pi-card-bubble-installed .material-symbols-outlined,
|
||||
body.light-mode .pi-card-bubble-installed .pi-card-bubble-text {
|
||||
color: #166534;
|
||||
|
|
@ -661,6 +680,16 @@
|
|||
border-color: rgba(59, 130, 246, 0.35);
|
||||
}
|
||||
|
||||
body.light-mode .pi-card-bubble-suspended .material-symbols-outlined,
|
||||
body.light-mode .pi-card-bubble-suspended .pi-card-bubble-text {
|
||||
color: #b45309;
|
||||
}
|
||||
|
||||
body.light-mode .pi-card-bubble-suspended:hover {
|
||||
background: rgba(245, 158, 11, 0.16);
|
||||
border-color: rgba(217, 119, 6, 0.35);
|
||||
}
|
||||
|
||||
.pi-pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue