aboutsummaryrefslogtreecommitdiff
path: root/api/sanitization.js
blob: 5c9d00941f70ddbaceb8671ce1094d71b3c044cb (plain)
1
2
3
4
5
6
7
8
9
10
function sanitizeRepoName(dirty)
{
	const valid_repo_name = /^[a-zA-Z0-9\.\-_]+$/;
	if(valid_repo_name.test(dirty)) {
		return true;
	}
	return false;
}

module.exports.sanitizeRepoName = sanitizeRepoName;