Add MIT copyright headers to all source files
Build and Push Docker Image / build (push) Successful in 48s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m21s
CI / Security audit (push) Successful in 1m47s
CI / Tests & coverage (push) Successful in 2m1s

This commit is contained in:
2026-05-19 09:07:42 +01:00
parent da77f083fe
commit 8c4cc20551
36 changed files with 36 additions and 5 deletions
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import axios from 'axios'; import axios from 'axios';
import './App.css'; import './App.css';
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
import React from 'react' import React from 'react'
import ReactDOM from 'react-dom/client' import ReactDOM from 'react-dom/client'
import App from './App.jsx' import App from './App.jsx'
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
let currentUser = null; let currentUser = null;
let downloads = []; let downloads = [];
let isAdmin = false; let isAdmin = false;
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Express application factory — imported by both server/index.js (production) * Express application factory — imported by both server/index.js (production)
* and the test suite. Keeping app creation separate from app.listen() means * and the test suite. Keeping app creation separate from app.listen() means
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2025 Gordon Bolton. MIT License. // Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const path = require('path'); const path = require('path');
const cookieParser = require('cookie-parser'); const cookieParser = require('cookie-parser');
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
function requireAuth(req, res, next) { function requireAuth(req, res, next) {
const signed = !!process.env.COOKIE_SECRET; const signed = !!process.env.COOKIE_SECRET;
const raw = signed ? req.signedCookies.emby_user : req.cookies.emby_user; const raw = signed ? req.signedCookies.emby_user : req.cookies.emby_user;
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* CSRF protection using the double-submit cookie pattern. * CSRF protection using the double-submit cookie pattern.
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const axios = require('axios'); const axios = require('axios');
const crypto = require('crypto'); const crypto = require('crypto');
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const router = express.Router(); const router = express.Router();
const requireAuth = require('../middleware/requireAuth'); const requireAuth = require('../middleware/requireAuth');
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const axios = require('axios'); const axios = require('axios');
const router = express.Router(); const router = express.Router();
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const router = express.Router(); const router = express.Router();
const axios = require('axios'); const axios = require('axios');
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const axios = require('axios'); const axios = require('axios');
const router = express.Router(); const router = express.Router();
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const axios = require('axios'); const axios = require('axios');
const router = express.Router(); const router = express.Router();
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const express = require('express'); const express = require('express');
const axios = require('axios'); const axios = require('axios');
const router = express.Router(); const router = express.Router();
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const { logToFile } = require('./logger'); const { logToFile } = require('./logger');
class MemoryCache { class MemoryCache {
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2025 Gordon Bolton. MIT License. // Copyright (c) 2026 Gordon Bolton. MIT License.
const { logToFile } = require('./logger'); const { logToFile } = require('./logger');
// Validate that a configured service URL is well-formed and uses http(s). // Validate that a configured service URL is well-formed and uses http(s).
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const axios = require('axios'); const axios = require('axios');
const cache = require('./cache'); const cache = require('./cache');
const { getSonarrInstances, getRadarrInstances } = require('./config'); const { getSonarrInstances, getRadarrInstances } = require('./config');
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2025 Gordon Bolton. MIT License. // Copyright (c) 2026 Gordon Bolton. MIT License.
// //
// Docker secrets support: if an environment variable named FOO_FILE is set, // Docker secrets support: if an environment variable named FOO_FILE is set,
// read its contents from the file at that path and expose it as FOO. // read its contents from the file at that path and expose it as FOO.
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2025 Gordon Bolton. MIT License. // Copyright (c) 2026 Gordon Bolton. MIT License.
const axios = require('axios'); const axios = require('axios');
const cache = require('./cache'); const cache = require('./cache');
const { getTorrents } = require('./qbittorrent'); const { getTorrents } = require('./qbittorrent');
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
const axios = require('axios'); const axios = require('axios');
const { logToFile } = require('./logger'); const { logToFile } = require('./logger');
const { getQbittorrentInstances } = require('./config'); const { getQbittorrentInstances } = require('./config');
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2025 Gordon Bolton. MIT License. // Copyright (c) 2026 Gordon Bolton. MIT License.
// Query-param secrets (SABnzbd apikey, generic token/password params) // Query-param secrets (SABnzbd apikey, generic token/password params)
const QUERY_SECRET_PATTERN = /([?&](?:apikey|token|password|api_key|key|secret)=)[^&\s#]*/gi; const QUERY_SECRET_PATTERN = /([?&](?:apikey|token|password|api_key|key|secret)=)[^&\s#]*/gi;
// HTTP auth header values (X-Api-Key, X-MediaBrowser-Token, Authorization, X-Emby-Authorization) // HTTP auth header values (X-Api-Key, X-MediaBrowser-Token, Authorization, X-Emby-Authorization)
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Persistent token store backed by a JSON file. * Persistent token store backed by a JSON file.
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Integration tests for authentication routes. * Integration tests for authentication routes.
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Integration tests for health and readiness endpoints. * Integration tests for health and readiness endpoints.
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Integration tests for GET /api/history/recent * Integration tests for GET /api/history/recent
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
import { vi, beforeEach, afterEach } from 'vitest'; import { vi, beforeEach, afterEach } from 'vitest';
import os from 'os'; import os from 'os';
import path from 'path'; import path from 'path';
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Tests for server/utils/config.js * Tests for server/utils/config.js
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Unit tests for server/utils/historyFetcher.js * Unit tests for server/utils/historyFetcher.js
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Tests for server/utils/qbittorrent.js pure utility functions. * Tests for server/utils/qbittorrent.js pure utility functions.
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Tests for server/middleware/requireAuth.js * Tests for server/middleware/requireAuth.js
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Tests for server/utils/sanitizeError.js * Tests for server/utils/sanitizeError.js
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Tests for server/utils/tokenStore.js * Tests for server/utils/tokenStore.js
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
/** /**
* Tests for server/middleware/verifyCsrf.js * Tests for server/middleware/verifyCsrf.js
* *
+1
View File
@@ -1,3 +1,4 @@
// Copyright (c) 2026 Gordon Bolton. MIT License.
import { defineConfig } from 'vitest/config'; import { defineConfig } from 'vitest/config';
export default defineConfig({ export default defineConfig({