Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7772fa7
Change default to lindat (#1408)
Kasinhou Jul 30, 2026
22098b9
LINDAT/Increased timeout (#1471)
Kasinhou Aug 20, 2026
2282563
LINDAT: Run e2e tests in Chrome for Testing (#1624)
milanmajchrak Oct 19, 2026
6e2f32b
LINDAT/Use official phpmyadmin Docker image in Matomo compose (1655) …
milanmajchrak Oct 27, 2026
13c08b7
LINDAT/Run the UI on Node 22 instead of end-of-life Node 18 (#1671)
milanmajchrak Oct 28, 2026
3ef70a2
CI: bump cypress-io/github-action to v7.4.4 (backport #1656)
Oct 28, 2026
c0c502d
Merge pull request #1676 from dataquest-dev/ci/cypress-action-v7.4.4-…
Kasinhou Oct 28, 2026
103df87
LINDAT/UFAL/Fix dspace-customers 1083 R68: sanitize RefBox citation H…
milanmajchrak Oct 28, 2026
33013a0
LINDAT/Backport ufal: send only the fields the licence asks for on do…
milanmajchrak Nov 2, 2026
544e127
LINDAT/Backport ufal: fill ${...} placeholders on the Terms of Servic…
milanmajchrak Nov 2, 2026
a19cb74
LINDAT/Backport ufal: add seven licence pages from LINDAT production …
milanmajchrak Nov 2, 2026
fe1f7c4
LINDAT/Backport ufal: refresh the Deposit page and point to recommend…
milanmajchrak Nov 2, 2026
7f16e81
LINDAT/Backport ufal: wrap long subject badges and show N/A for an em…
milanmajchrak Nov 2, 2026
0c5bc42
LINDAT/SSR static pages no longer trust the Host header; SSR cache ke…
milanmajchrak Nov 2, 2026
05966d3
LINDAT/fix(security): harden dsAuthInfo auth cookie with Secure and S…
milanmajchrak Nov 2, 2026
a10b846
LINDAT/Fix double encoding of CLARIN license names containing '+' (#1…
milanmajchrak Nov 2, 2026
09e1d57
LINDAT/fix(fe): redirect anonymous bitstream download on the server t…
milanmajchrak Nov 2, 2026
18f53e6
LINDAT/BitstreamUrlSerializer: keep the full query string and fragmen…
milanmajchrak Nov 2, 2026
3681524
LINDAT/fix(view-mode-switch): drop data-toggle="buttons" to stop Boot…
milanmajchrak Nov 2, 2026
a923df2
LINDAT/Fix the causes of the REST self link console warnings (#1693)
milanmajchrak Nov 2, 2026
6567fff
LINDAT/fix(robots): disallow scoped search and facet links (#1695)
milanmajchrak Nov 2, 2026
cc146b1
Merge tag 'lindat-2026.11.41471243025' into dataquest/conflict-resolv…
kosarko Nov 6, 2026
06b334b
Merge remote-tracking branch 'origin/clarin-v7' into dataquest/confli…
kosarko Nov 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
strategy:
# Create a matrix of Node versions to test against (in parallel)
matrix:
node-version: [18.x, 20.x]
node-version: [20.x, 22.x]
# Do NOT exit immediately if one matrix job fails
fail-fast: false
# These are the actual CI steps to perform per job
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
- name: Upload code coverage report to Artifact
uses: actions/upload-artifact@v4
if: matrix.node-version == '18.x'
if: matrix.node-version == '22.x'
with:
name: coverage-report-${{ matrix.node-version }}
path: 'coverage/dspace-angular/lcov.info'
Expand Down Expand Up @@ -288,6 +288,21 @@ jobs:
- name: Stop running app
run: kill -9 $(lsof -t -i:4000)

# If any prior step errors out, export the backend logs for help with debugging issues
- name: Export backend logs (on failure only)
if: failure()
run: |
docker compose -f ./docker/docker-compose-ci.yml logs > backend-logs-${{ matrix.node-version }}.txt

# If any prior step errors out, upload backend logs to artifact
- name: Upload backend logs to artifact (on failure only)
uses: actions/upload-artifact@v4
if: failure()
with:
name: backend-logs-${{ matrix.node-version }}
path: backend-logs-${{ matrix.node-version }}.txt
retention-days: 14

- name: Shutdown Docker containers
run: docker compose -f ./docker/docker-compose-ci.yml down

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
playwright-tests:
runs-on: dspace-test-1
timeout-minutes: 45
timeout-minutes: 60
steps:
- name: Checkout Playwright tests
uses: actions/checkout@v4
Expand All @@ -20,7 +20,7 @@ jobs:
working-directory: dspace-ui-tests/scripts
env:
HOME_URL: https://dev-5.pc:8443/repository/
NAME: DEFAULT
NAME: LINDAT
PASSWORD_ADMIN: ${{ secrets.DSPACE_ADMIN_PASSWORD }}
run: |
./test.sh
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This image will be published as dspace/dspace-angular
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details

FROM docker.io/node:18-alpine
FROM docker.io/node:22-alpine

# Ensure Python and other build tools are available
# These are needed to install some node modules, especially on linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Test build:
# docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-7_x-dist .

FROM docker.io/node:18-alpine AS build
FROM docker.io/node:22-alpine AS build

# Ensure Python and other build tools are available
# These are needed to install some node modules, especially on linux/arm64
Expand All @@ -20,7 +20,7 @@ ADD . /app/
ENV NODE_OPTIONS="--max_old_space_size=4096"
RUN yarn build:prod

FROM node:18-alpine
FROM node:22-alpine
RUN npm install --global pm2

COPY --chown=node:node --from=build /app/dist /app/dist
Expand Down
2 changes: 1 addition & 1 deletion docker/matomo-w-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
MARIADB_INITDB_SKIP_TZINFO: ${MATOMO_MARIADB_INITDB_SKIP_TZINFO:-1}

gui:
image: phpmyadmin/phpmyadmin
image: phpmyadmin
ports:
- 8148:80
container_name: matomo_phpAdmin
Expand Down
25 changes: 7 additions & 18 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import { APP_CONFIG, AppConfig } from './src/config/app-config.interface';
import { extendEnvironmentWithAppConfig } from './src/config/config.util';
import { logStartupMessage } from './startup-message';
import { TOKENITEM } from './src/app/core/auth/models/auth-token-info.model';
import { getSsrCacheKey } from './src/app/shared/ssr-cache-key.util';
import { SsrExcludePatterns } from './src/config/universal-config.interface';


Expand Down Expand Up @@ -383,14 +384,14 @@ function anonymousCacheEnabled(): boolean {

/**
* Check if the currently requested page is in our server-side, in-memory cache.
* Caching is ONLY done for SSR requests. Pages are cached base on their path (e.g. /home or /search?query=test)
* Caching is ONLY done for SSR requests. Pages are cached by path, origin and language (see getSsrCacheKey)
*/
function cacheCheck(req, res, next) {
// Cached copy of page (if found)
let cachedCopy;

// If the bot cache is enabled and this request looks like a bot, check the bot cache for a cached page.
if (botCacheEnabled() && isbot(req.get('user-agent'))) {
// If the bot cache is enabled and this request looks like an anonymous bot, check the bot cache for a cached page.
if (botCacheEnabled() && isbot(req.get('user-agent')) && !isUserAuthenticated(req)) {
cachedCopy = checkCacheForRequest('bot', botCache, req, res);
} else if (anonymousCacheEnabled() && !isUserAuthenticated(req)) {
cachedCopy = checkCacheForRequest('anonymous', anonymousCache, req, res);
Expand Down Expand Up @@ -433,7 +434,7 @@ function cacheCheck(req, res, next) {
*/
function checkCacheForRequest(cacheName: string, cache: LRU<string, any>, req, res): any {
// Get the cache key for this request
const key = getCacheKey(req);
const key = getSsrCacheKey(req);

// Check if this page is in our cache
let cachedCopy = cache.get(key);
Expand All @@ -457,18 +458,6 @@ function checkCacheForRequest(cacheName: string, cache: LRU<string, any>, req, r
return cachedCopy;
}

/**
* Create a cache key from the current request.
* The cache key is the URL path (NOTE: this key will also include any querystring params).
* E.g. "/home" or "/search?query=test"
* @param req current request
* @returns cache key to use for this page
*/
function getCacheKey(req): string {
// NOTE: this will return the URL path *without* any baseUrl
return req.url;
}

/**
* Save page to server side cache(s), if enabled. If caching is not enabled or a user is authenticated, this is a noop
* If multiple caches are enabled, the page will be saved to any caches where it does not yet exist (or is expired).
Expand All @@ -481,9 +470,9 @@ function saveToCache(req, page: any) {
// NOTE: It's not safe to save page data to the cache when a user is authenticated. In that situation,
// the page may include sensitive or user-specific materials. As the cache is shared across all users, it can only contain public info.
if (!isUserAuthenticated(req)) {
const key = getCacheKey(req);
const key = getSsrCacheKey(req);
// Avoid caching "/reload/[random]" paths (these are hard refreshes after logout)
if (key.startsWith('/reload')) { return; }
if (req.url.startsWith('/reload')) { return; }
// Avoid caching not successful responses (status code different from 2XX status)
if (hasNotSucceeded(req.res.statusCode)) { return; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('ClarinBitstreamDownloadPageComponent', () => {

beforeEach(async () => {
authService = jasmine.createSpyObj('authService', {
isAuthenticated: observableOf(true),
isAuthenticated: observableOf(false),
setRedirectUrl: {}
});
authorizationService = jasmine.createSpyObj('authorizationSerivice', {
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('ClarinBitstreamDownloadPageComponent', () => {
};
router = jasmine.createSpyObj('router', ['navigateByUrl']);
requestService = getMockRequestService();
halService = Object.assign(new HALEndpointServiceStub(url));
halService = Object.assign(new HALEndpointServiceStub(url), { getRootHref: () => url }) as any;
rdbService = getMockRemoteDataBuildService();

await TestBed.configureTestingModule({
Expand Down Expand Up @@ -100,4 +100,8 @@ describe('ClarinBitstreamDownloadPageComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});

it('should redirect an anonymous user to the bitstream content through HardRedirectService', () => {
expect(hardRedirectService.redirect).toHaveBeenCalledWith('bitstream-content-link');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ export class ClarinBitstreamDownloadPageComponent implements OnInit {
window.location.replace(fileLink);
} else if ((isAuthorized || isAuthorizedByClarin) && !isLoggedIn) {
this.downloadStatus.next(RequestEntryState.Success);
window.location.replace(bitstreamURL);
// Server-side too, so crawlers get a 302. Logged-in users keep the client-side
// redirect: a server 302 right after login left the browser on the login page.
this.hardRedirectService.redirect(bitstreamURL);
} else if (!(isAuthorized || isAuthorizedByClarin) && isLoggedIn &&
this.downloadStatus.value === RequestEntryState.Error) {
// this.downloadStatus is `ERROR` - no CLARIN exception is thrown up
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { BitstreamDataService } from '../../core/data/bitstream-data.service';
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { TranslateService } from '@ngx-translate/core';
import { MAX_PAGE_SIZE } from '../../core/data/find-list-options.model';

/**
* Fetch ZIP file from the server as a single file into `bitstreamRD$` property which is extended and then call
Expand Down Expand Up @@ -59,7 +60,7 @@ export class ClarinZipDownloadPageComponent extends ClarinBitstreamDownloadPageC
this.itemRD$.subscribe((itemRD: RemoteData<Item>) => {
this.bitstreamDataService.findAllByItemAndBundleName(itemRD?.payload, 'ORIGINAL', {
currentPage: 1,
elementsPerPage: 9999
elementsPerPage: MAX_PAGE_SIZE
}).pipe(
getFirstCompletedRemoteData(),
).subscribe((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BehaviorSubject } from 'rxjs';
import { ClarinLicense } from '../../core/shared/clarin/clarin-license.model';
import { ClarinLicenseDataService } from '../../core/data/clarin/clarin-license-data.service';
import { getFirstSucceededRemoteListPayload } from '../../core/shared/operators';
import { FindListOptions } from '../../core/data/find-list-options.model';
import { FindListOptions, MAX_PAGE_SIZE } from '../../core/data/find-list-options.model';
import { ClarinLicenseRequiredInfo } from '../../core/shared/clarin/clarin-license.resource-type';
import { ClarinLicenseRequiredInfoSerializer } from '../../core/shared/clarin/clarin-license-required-info-serializer';

Expand Down Expand Up @@ -36,7 +36,7 @@ export class ClarinAllLicensesPageComponent implements OnInit {
const options = new FindListOptions();
options.currentPage = 0;
// Load all licenses
options.elementsPerPage = 1000;
options.elementsPerPage = MAX_PAGE_SIZE;
return this.clarinLicenseService.findAll(options, false)
.pipe(getFirstSucceededRemoteListPayload())
.subscribe(res => {
Expand Down
26 changes: 25 additions & 1 deletion src/app/core/auth/auth.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { CookieService } from '../services/cookie.service';
import { AuthRequestServiceStub } from '../../shared/testing/auth-request-service.stub';
import { AuthRequestService } from './auth-request.service';
import { AuthStatus } from './models/auth-status.model';
import { AuthTokenInfo } from './models/auth-token-info.model';
import { AuthTokenInfo, TOKENITEM } from './models/auth-token-info.model';
import { EPerson } from '../eperson/models/eperson.model';
import { EPersonMock } from '../../shared/testing/eperson.mock';
import { AppState } from '../../app.reducer';
Expand Down Expand Up @@ -369,6 +369,30 @@ describe('AuthService test', () => {
expect(storage.set).toHaveBeenCalled();
});

it('should store the token with a Secure, SameSite cookie when served over https', () => {
Object.defineProperty(window, 'nativeWindow', {
get: () => ({ location: { protocol: 'https:' } }),
configurable: true,
});
authService.storeToken(token);
expect(storage.set).toHaveBeenCalledWith(TOKENITEM, token, jasmine.objectContaining({
secure: true,
sameSite: 'lax',
}));
});

it('should store the token without the Secure flag when served over http', () => {
Object.defineProperty(window, 'nativeWindow', {
get: () => ({ location: { protocol: 'http:' } }),
configurable: true,
});
authService.storeToken(token);
expect(storage.set).toHaveBeenCalledWith(TOKENITEM, token, jasmine.objectContaining({
secure: false,
sameSite: 'lax',
}));
});

it('should remove token from storage', () => {
authService.removeToken();
expect(storage.remove).toHaveBeenCalled();
Expand Down
7 changes: 6 additions & 1 deletion src/app/core/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,12 @@ export class AuthService {

// Set the cookie expire date
const expires = new Date(expireDate);
const options: CookieAttributes = {expires: expires};
// Use Secure on HTTPS; Lax allows external-auth redirects via top-level GET navigation.
const options: CookieAttributes = {
expires: expires,
secure: this._window.nativeWindow.location?.protocol === 'https:',
sameSite: 'lax',
};

// Save cookie with the token
return this.storage.set(TOKENITEM, token, options);
Expand Down
3 changes: 2 additions & 1 deletion src/app/core/browse/browse.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-con
import { BrowseDefinitionDataService } from './browse-definition-data.service';
import { SortDirection } from '../cache/models/sort-options.model';
import { environment } from '../../../environments/environment';
import { MAX_PAGE_SIZE } from '../data/find-list-options.model';


export function getBrowseLinksToFollow(): FollowLinkConfig<BrowseEntry | Item>[] {
Expand Down Expand Up @@ -69,7 +70,7 @@ export class BrowseService {
*/
getBrowseDefinitions(): Observable<RemoteData<PaginatedList<BrowseDefinition>>> {
// TODO properly support pagination
return this.browseDefinitionDataService.findAll({ elementsPerPage: 9999 }).pipe(
return this.browseDefinitionDataService.findAll({ elementsPerPage: MAX_PAGE_SIZE }).pipe(
getFirstSucceededRemoteData(),
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/data/bundle-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { RequestService } from './request.service';
import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model';
import { Bitstream } from '../shared/bitstream.model';
import { RequestEntryState } from './request-entry-state.model';
import { FindListOptions } from './find-list-options.model';
import { FindListOptions, MAX_PAGE_SIZE } from './find-list-options.model';
import { IdentifiableDataService } from './base/identifiable-data.service';
import { PatchData, PatchDataImpl } from './base/patch-data';
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
Expand Down Expand Up @@ -81,7 +81,7 @@ export class BundleDataService extends IdentifiableDataService<Bundle> implement
findByItemAndName(item: Item, bundleName: string, useCachedVersionIfAvailable = true, reRequestOnStale = true, options?: FindListOptions, ...linksToFollow: FollowLinkConfig<Bundle>[]): Observable<RemoteData<Bundle>> {
//Since we filter by bundleName where the pagination options are not indicated we need to load all the possible bundles.
// This is a workaround, in substitution of the previously recursive call with expand
const paginationOptions = options ?? { elementsPerPage: 9999 };
const paginationOptions = options ?? { elementsPerPage: MAX_PAGE_SIZE };
return this.findAllByItem(item, paginationOptions, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow).pipe(
map((rd: RemoteData<PaginatedList<Bundle>>) => {
if (hasValue(rd.payload) && hasValue(rd.payload.page)) {
Expand Down
Loading
Loading