Skip to content

Ranaming master branch to main. #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

push:
branches:
- master
- main
- develop

pull_request:
Expand All @@ -30,7 +30,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: github branch
run: |
if [ "${{ github.event.release.target_commitish }}" != "" ]; then
Expand All @@ -39,7 +39,7 @@ jobs:
BRANCH=${GITHUB_REF##*/}
fi
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV
if [ "$BRANCH" == "master" ]; then
if [ "$BRANCH" == "main" ]; then
echo "CLOWDER_VERSION=$(awk '/version = / { print $4 }' project/Build.scala | sed 's/"//g')" >> $GITHUB_ENV
elif [ "$BRANCH" == "develop" ]; then
echo "CLOWDER_VERSION=develop" >> $GITHUB_ENV
Expand All @@ -51,12 +51,12 @@ jobs:
distribution: 'zulu'
java-version: 8
- name: Cache SBT ivy cache
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('project/Build.scala') }}
- name: Cache SBT
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/Build.scala') }}
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
ports:
- 27017:27017
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: github branch
run: |
if [ "${{ github.event.release.target_commitish }}" != "" ]; then
Expand All @@ -94,7 +94,7 @@ jobs:
BRANCH=${GITHUB_REF##*/}
fi
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV
if [ "$BRANCH" == "master" ]; then
if [ "$BRANCH" == "main" ]; then
echo "CLOWDER_VERSION=$(awk '/version = / { print $4 }' project/Build.scala | sed 's/"//g')" >> $GITHUB_ENV
elif [ "$BRANCH" == "develop" ]; then
echo "CLOWDER_VERSION=develop" >> $GITHUB_ENV
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: github branch
run: |
if [ "${{ github.event.release.target_commitish }}" != "" ]; then
Expand All @@ -139,7 +139,7 @@ jobs:
BRANCH=${GITHUB_REF##*/}
fi
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV
if [ "$BRANCH" == "master" ]; then
if [ "$BRANCH" == "main" ]; then
echo "CLOWDER_VERSION=$(awk '/version = / { print $4 }' project/Build.scala | sed 's/"//g')" >> $GITHUB_ENV
elif [ "$BRANCH" == "develop" ]; then
echo "CLOWDER_VERSION=develop" >> $GITHUB_ENV
Expand Down Expand Up @@ -177,13 +177,13 @@ jobs:
done
rm ${ZIPFILE}
zip -r ${ZIPFILE} ${DIR}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: clowder.zip
path: target/universal/clowder-*.zip
- name: Upload files to a GitHub release
if: github.event_name == 'release' && github.event.action == 'created'
uses: svenstaro/upload-release-action@1.1.0
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
Expand All @@ -207,7 +207,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: github branch
run: |
if [ "${{ github.event.release.target_commitish }}" != "" ]; then
Expand All @@ -216,7 +216,7 @@ jobs:
BRANCH=${GITHUB_REF##*/}
fi
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV
if [ "$BRANCH" == "master" ]; then
if [ "$BRANCH" == "main" ]; then
echo "CLOWDER_VERSION=$(awk '/version = / { print $4 }' project/Build.scala | sed 's/"//g')" >> $GITHUB_ENV
elif [ "$BRANCH" == "develop" ]; then
echo "CLOWDER_VERSION=develop" >> $GITHUB_ENV
Expand All @@ -237,18 +237,18 @@ jobs:
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/Build.scala') }}
- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.11
- name: sbt doc
run: ./sbt doc
env:
BRANCH: ${{ env.GITHUB_BRANCH }}
VERSION: ${{ env.CLOWDER_VERSION }}
BUILDNUMBER: ${{ github.run_number }}
GITSHA1: ${{ github.sha }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ScalaDoc
path: target/scala-*/api/
Expand All @@ -266,7 +266,7 @@ jobs:
cd doc/src/sphinx/
python -m pip install -r requirements.txt
make html epub
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: HTML Documentation
path: doc/src/sphinx/_build/html
Expand All @@ -279,13 +279,13 @@ jobs:
key: ${{ secrets.SCP_KEY }}
files: "doc/src/sphinx/_build/html/*"
target: "CATS/${{ env.CLOWDER_VERSION }}/documentation/sphinx"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: EPUB Documentation
path: doc/src/sphinx/_build/epub/Clowder.epub
- name: Upload files to a GitHub release
if: github.event_name == 'release' && github.event.action == 'created'
uses: svenstaro/upload-release-action@1.1.0
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Docker
# and would not set the right version flags.

# This will run when:
# - when new code is pushed to master/develop to push the tags
# - when new code is pushed to main/develop to push the tags
# latest and develop
# - when a pull request is created and updated to make sure the
# Dockerfile is still valid.
Expand All @@ -16,14 +16,14 @@ name: Docker
on:
push:
branches:
- master
- main
- develop

pull_request:

# Certain actions will only run when this is the master repo.
# Certain actions will only run when this is the main repo.
env:
MASTER_REPO: clowder-framework/clowder
MAIN_REPO: clowder-framework/clowder
DOCKERHUB_ORG: clowder

jobs:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
PLATFORM: "linux/amd64"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# calculate some variables that are used later
- name: variable setup
Expand All @@ -77,7 +77,7 @@ jobs:
BRANCH=${GITHUB_REF##*/}
fi

if [ "$BRANCH" == "master" ]; then
if [ "$BRANCH" == "main" ]; then
version="$(awk '/version = / { print $4 }' project/Build.scala | sed 's/"//g')"
tags="latest"
oldversion=""
Expand Down Expand Up @@ -115,11 +115,11 @@ jobs:

# setup docker build
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Inspect Builder
run: |
Expand All @@ -132,13 +132,13 @@ jobs:
# login to registries
- name: Login to DockerHub
if: env.dockerhub != ''
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -147,7 +147,7 @@ jobs:
# build the clowder docker images
- name: Build and push ${{ matrix.IMAGE }}-build
if: matrix.IMAGE == 'clowder'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
context: ${{ matrix.FOLDER }}
Expand All @@ -164,7 +164,7 @@ jobs:

- name: Build and push ${{ matrix.IMAGE }}-runtime
if: matrix.IMAGE == 'clowder'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
context: ${{ matrix.FOLDER }}
Expand All @@ -182,7 +182,7 @@ jobs:
# build the other docker images
- name: Build and push ${{ matrix.IMAGE }}
if: matrix.IMAGE != 'clowder'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
context: ${{ matrix.FOLDER }}
Expand All @@ -198,10 +198,10 @@ jobs:

# update README at DockerHub
- name: Docker Hub Description
if: env.dockerhub != '' && matrix.README != '' && github.event_name == 'push' && github.repository == env.MASTER_REPO && env.BRANCH == 'master'
uses: peter-evans/dockerhub-description@v2
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_REPOSITORY: ${{ env.DOCKERHUB_ORG }}/${{ matrix.IMAGE }}
README_FILEPATH: ${{ matrix.README }}
if: env.dockerhub != '' && matrix.README != '' && github.event_name == 'push' && github.repository == env.MAIN_REPO && env.BRANCH == 'main'
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.DOCKERHUB_ORG }}/${{ matrix.IMAGE }}
readme-filepath : ${{ matrix.README }}
6 changes: 3 additions & 3 deletions .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: swagger

# This will run when:
# - when new code is pushed to master/develop to make sure the
# - when new code is pushed to main/develop to make sure the
# code does compile.
# - when a pull request is created and updated to make sure the
# code does compile.
on:
push:
branches:
- master
- main
- develop

pull_request:
Expand All @@ -20,7 +20,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: openapi-lint
uses: mbowman100/swagger-validator-action@master
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.23.0 - 2025-07-31

### Fixed
- Fixed XSS in space creation by escaping name and description field.
- Fixed `NoSuchElementException` in spaces listing page when user is not defined. The error occurred when calling
`user.get.id` on an undefined user in the spaces ownership dropdown. Added proper user existence checks in
`listSpaces.scala.html` and `miniList.scala.html` templates.
- Removed refrences to repo.typesafe.com from sbt-launch.jar and build.scala
- Removed iRods integration and dependencies. The iRods file storage service and plugin have been completely removed
from the codebase. Users who were using iRods for file storage will need to configure an alternative storage
backend (filesystem, MongoDB GridFS, or AWS S3).

## 1.22.1 - 2023-11-10

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ below. By participating in this project, you agree to abide by the [code of cond
Before your code can be accepted, you will have to sign a [CLA](https://clowderframework.org/pdf/Clowder-CLA.pdf)
and mail it to [email protected].

Most of the core development happens on [NCSA Bitbucket][bitbucket]. The `master` and `develop` branches are pushed to
Most of the core development happens on [NCSA Bitbucket][bitbucket]. The `` and `develop` branches are pushed to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing main

[GitHub][github] nightly.

We encourage contributors to create an account on [NCSA Bitbucket][bitbucket] and make pull requests there. We also accept
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------------------------------------
# BUILD CLOWDER DIST
# ----------------------------------------------------------------------
FROM openjdk:8-jdk-bullseye as clowder-build
FROM openjdk:8-jdk-bullseye AS clowder-build

ARG BRANCH="unknown"
ARG VERSION="unknown"
Expand Down Expand Up @@ -40,7 +40,7 @@
# ----------------------------------------------------------------------
# BUILD CLOWDER
# ----------------------------------------------------------------------
FROM openjdk:8-jre-bullseye as clowder-runtime
FROM openjdk:8-jre-bullseye AS clowder-runtime

# environemnt variables
ARG BRANCH="unknown"
Expand Down Expand Up @@ -73,7 +73,7 @@
USER 10001

# command to run when starting docker
CMD /home/clowder/clowder.sh

Check warning on line 76 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker (clowder)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 76 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker (clowder)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

# health check
HEALTHCHECK CMD /home/clowder/healthcheck.sh
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Next we install the script that will install or update clowder.
cat > /home/browndog/update-clowder.sh << EOF
#!/bin/bash

# CATS-WWW (master) is the main branch for this server
# CATS-WWW () is the main branch for this server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing main

# CATS-WWW1 (develop) if you want the latest version
clowder_BRANCH=${clowder_BRANCH:-"CATS-WWW1"}

Expand Down
3 changes: 2 additions & 1 deletion app/controllers/Spaces.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.joda.time.DateTime
import play.api.data.Forms._
import play.api.data.{Form, Forms}
import play.api.i18n.Messages
import play.api.templates.HtmlFormat
import play.api.{Logger, Play}
import securesocial.core.providers.{Token, UsernamePasswordProvider}
import services._
Expand Down Expand Up @@ -411,7 +412,7 @@ class Spaces @Inject() (spaces: SpaceService, users: UserService, events: EventS
formData => {
if (Permission.checkPermission(user, Permission.CreateSpace)) {
Logger.debug("Creating space " + formData.name)
val newSpace = ProjectSpace(name = formData.name, description = formData.description,
val newSpace = ProjectSpace(name = HtmlFormat.escape(formData.name).toString(), description = HtmlFormat.escape(formData.description).toString(),
created = new Date, creator = userId, homePage = formData.homePage,
logoURL = formData.logoURL, bannerURL = formData.bannerURL,
collectionCount = 0, datasetCount = 0, fileCount = 0, userCount = 0, spaceBytes = 0, metadata = List.empty,
Expand Down
Loading
Loading