Commit Graph

31 Commits

Author SHA1 Message Date
shuki
440d741fdb Match logo text size to icon height (32px)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:21:15 +02:00
shuki
a81702f344 Increase nav logo text size from 1.4rem to 2rem
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:20:24 +02:00
shuki
ffd4792aa0 Update WHM logo: new icon + "GNIZA Backup" text in nav
Replace old logo SVG with gniza.svg and render the icon alongside
"GNIZA Backup" text where "Backup" uses the icon's orange (#f47216).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:19:46 +02:00
shuki
7b2a9ad601 Move logo inline with nav tabs instead of above them
Place the SVG icon next to the tab bar in a flex row instead of
rendering it as a separate centered block above the navigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:15:58 +02:00
shuki
a779d861a6 Fix CSRF upgrade path: remove stale file before creating directory
Old versions stored CSRF/flash as plain files at the directory path.
New code expects directories. _ensure_dir now removes conflicting
plain files left by older versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 00:14:33 +02:00
shuki
cc7e46a88f Fix CSRF token write failure and SMTP test token sync
- Add fallback write when O_EXCL _safe_write fails for CSRF tokens
  (ensures token is always persisted to disk)
- Update SMTP test JS to sync new CSRF token into main form hidden field
  (prevents stale token after SMTP test consumes the original)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 00:09:24 +02:00
shuki
1f68ea1058 Security hardening, static analysis fixes, and expanded test coverage
- Fix CRITICAL: safe config parser replacing shell source, sshpass -e,
  CSRF with /dev/urandom, symlink-safe file I/O
- Fix HIGH: input validation for timestamps/accounts, path traversal
  prevention in Runner.pm, AJAX CSRF on all endpoints
- Fix MEDIUM: umask 077, chmod 700 on config dirs, Config.pm TOCTOU lock,
  rsync exit code capture bug, RSYNC_EXTRA_OPTS character validation
- ShellCheck: fix word-splitting in notify.sh, safe rm in pkgacct.sh,
  suppress cross-file SC2034 false positives
- Perl::Critic: return undef→bare return, return (sort), unpack @_,
  explicit return on void subs, rename Config::write→save
- Remove dead code: enforce_retention_all(), rsync_dry_run()
- Add require_cmd checks for rsync/ssh/hostname/gzip at startup
- Escape $hint/$tip in CGI helper functions for defense-in-depth
- Expand tests from 17→40: validate_timestamp, validate_account_name,
  _safe_source_config (including malicious input), numeric validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:57:26 +02:00
shuki
b16893086d Add terminate-before-restore toggle, logo, and installer improvements
- Add "Terminate First" toggle to restore page (UI, Runner, CLI, lib)
- When enabled, removes existing cPanel account before restoring
- Add GNIZA Backup SVG logo to WHM plugin header (inline base64)
- Copy uninstall.sh to /usr/local/gniza/ during installation
- Update CLAUDE.md with new restore params and Runner options

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:43:48 +02:00
shuki
c602df43f6 Convert SSH Key Setup to collapsed accordion
Uses DaisyUI collapse component so the SSH guidance is hidden
by default and expandable on click.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:04:26 +02:00
shuki
3a74e4fd7a Add client-side table sorting to all tables
Clicking any column header sorts the table rows. Supports text and
numeric sorting with ascending/descending toggle and arrow indicators.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:48:51 +02:00
shuki
3a0379846e Reduce base font size from 2.3rem to 1.6rem for normal button sizing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:46:10 +02:00
shuki
ef491b6c2d Increase top padding to 30px on main container
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:44:04 +02:00
shuki
afdbdd14a1 Use inline style for container padding (scoped CSS can't target itself)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:43:09 +02:00
shuki
5c9e170454 Fix main container padding using standard Tailwind class p-2.5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:41:35 +02:00
shuki
d5c53b254e Add 10px padding to main container
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:40:19 +02:00
shuki
83942e6b12 Remove page title from WHM plugin header
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:39:20 +02:00
shuki
f19609423f Rename display text to GNIZA Backup Manager across all WHM pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:37:26 +02:00
shuki
5a8470b3f5 Remove explicit background color to inherit WHM's background
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:32:07 +02:00
shuki
8243bc1c42 Revert active tab text color change
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:29:13 +02:00
shuki
bc2d2bf86a Set active tab text color to #fecc00
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:28:18 +02:00
shuki
6fc9c2e2b9 Add custom gniza color theme based on user palette
Custom DaisyUI theme using the provided color palette:
- Primary: dark blue rgb(5,61,142)
- Secondary/Error: orange rgb(238,118,45)
- Accent/Warning: yellow rgb(254,204,0)
- Info: teal rgb(90,168,189)
- Neutral: darker blue rgb(2,44,105)
- Base: white/gray

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:26:33 +02:00
shuki
1d3ef21568 Remove underline from nav tabs on hover
Override WHM's default anchor underline styling with no-underline class.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:19:03 +02:00
shuki
146c614617 Revert hover underline on navigation tabs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:18:14 +02:00
shuki
77c131abd4 Add underline on hover to navigation tabs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:17:36 +02:00
shuki
7ccaf4e454 Increase WHM base font size from 2rem to 2.3rem
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:15:26 +02:00
shuki
4aa8cf7ea5 Increase base font size from 1.7rem to 2rem
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:11:03 +02:00
shuki
1efde7487b Replace all inline CSS with Tailwind utility classes
Convert style attributes to Tailwind: width:fit-content → w-fit,
background:#fafafa → bg-[#fafafa], display:none → hidden attr,
display:inline → inline class, max-height → max-h-[360px],
padding/border-radius/font-size → px-5 py-3 rounded-lg text-sm.
Update JS to use .hidden property instead of .style.display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:03:22 +02:00
shuki
fac7dc6c80 Add SMTP notification support with WHM settings UI
Send email via curl SMTP when SMTP_HOST is configured, falling back
to system mail/sendmail when empty. NOTIFY_EMAIL now accepts
comma-separated addresses. WHM Settings page gets an SMTP card
with Send Test Email button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:46:47 +02:00
shuki
84b2f464c9 Add remote directory init on WHM remote creation
When adding a remote via WHM, create the base directory structure
on the remote server (matching gniza init remote CLI behavior).
Creates $REMOTE_BASE/<hostname>/accounts/ via SSH mkdir or rclone mkdir.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:41:40 +02:00
shuki
66870d9604 Add Logs tab to WHM plugin for viewing activity logs
Read-only log viewer with file list (sorted by mtime), per-file viewer
with level-based coloring (ERROR/WARN/INFO/DEBUG), level filter buttons,
cron log truncation (last 500 lines default), and path traversal protection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:30:56 +02:00
shuki
1459bd1b8b Initial commit: gniza backup & disaster recovery CLI + WHM plugin
Full-featured cPanel backup tool with SSH, S3, and Google Drive support.
Includes WHM plugin with Tailwind/DaisyUI UI, multi-remote management,
decoupled schedules, and account restore workflows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:39:39 +02:00