Subversion Repositories RepoView

Rev

Rev 13 | Rev 15 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13 Rev 14
Line 1... Line 1...
1
/* $Id: modern.c 13 2024-08-21 12:31:40Z nishi $ */
1
/* $Id: modern.c 14 2024-08-21 14:24:05Z nishi $ */
2
 
2
 
3
#include "rv_query.h"
3
#include "rv_query.h"
4
 
4
 
5
#include "rv_util.h"
5
#include "rv_util.h"
6
#include "rv_version.h"
6
#include "rv_version.h"
Line 243... Line 243...
243
		char cbuf[2];
243
		char cbuf[2];
244
		cbuf[0] = REPO_USER_DELIM;
244
		cbuf[0] = REPO_USER_DELIM;
245
		cbuf[1] = 0;
245
		cbuf[1] = 0;
246
		add_data(&page, "Username cannot contain '<code>");
246
		add_data(&page, "Username cannot contain '<code>");
247
		add_data(&page, cbuf);
247
		add_data(&page, cbuf);
248
		add_data(&page, "</code>'.<br>");
248
		add_data(&page, "</code>' and '<code>#</code>'.<br>");
249
		add_data(&page, "	<input type=\"submit\" value=\"Signup\">\n");
249
		add_data(&page, "	<input type=\"submit\" value=\"Signup\">\n");
250
		add_data(&page, "</form>\n");
250
		add_data(&page, "</form>\n");
251
	} else if(strcmp(query, "sendsignup") == 0) {
251
	} else if(strcmp(query, "sendsignup") == 0) {
252
		title = rv_strdup("Signup Result");
252
		title = rv_strdup("Signup Result");
253
		page = rv_strdup("");
253
		page = rv_strdup("");
Line 266... Line 266...
266
				if(user != NULL) free(user);
266
				if(user != NULL) free(user);
267
				int i;
267
				int i;
268
				bool reject = false;
268
				bool reject = false;
269
				char* name = rv_get_query("username");
269
				char* name = rv_get_query("username");
270
				for(i = 0; name[i] != 0; i++) {
270
				for(i = 0; name[i] != 0; i++) {
271
					if(name[i] == REPO_USER_DELIM) {
271
					if(name[i] == REPO_USER_DELIM || name[i] == '#') {
272
						char cbuf[2];
272
						char cbuf[2];
273
						cbuf[0] = REPO_USER_DELIM;
273
						cbuf[0] = REPO_USER_DELIM;
274
						cbuf[1] = 0;
274
						cbuf[1] = 0;
275
						add_data(&page, "Username cannot contain '<code>");
275
						add_data(&page, "Username cannot contain '<code>");
276
						add_data(&page, cbuf);
276
						add_data(&page, cbuf);
Line 384... Line 384...
384
			add_data(&page, "			<td><input type=\"submit\" value=\"Create\"></td>\n");
384
			add_data(&page, "			<td><input type=\"submit\" value=\"Create\"></td>\n");
385
			add_data(&page, "		</tr>\n");
385
			add_data(&page, "		</tr>\n");
386
			add_data(&page, "	</table>\n");
386
			add_data(&page, "	</table>\n");
387
			add_data(&page, "Repository name cannot contain '<code>");
387
			add_data(&page, "Repository name cannot contain '<code>");
388
			add_data(&page, cbuf);
388
			add_data(&page, cbuf);
389
			add_data(&page, "</code>'.");
389
			add_data(&page, "</code>' and '<code>#</code>'.");
390
			add_data(&page, "</form>\n");
390
			add_data(&page, "</form>\n");
391
			add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
391
			add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
392
			add_data(&page, "<table border=\"0\">\n");
392
			add_data(&page, "<table border=\"0\">\n");
393
			add_data(&page, "<tr><th>Repository name</th><th>Revision</th></tr>\n");
393
			add_data(&page, "<tr><th>Repository name</th><th>Revision</th></tr>\n");
394
			rv_repo_list(user, list_repo);
394
			rv_repo_list(user, list_repo);
Line 408... Line 408...
408
		} else {
408
		} else {
409
			int i;
409
			int i;
410
			bool reject = false;
410
			bool reject = false;
411
			char* name = rv_get_query("name");
411
			char* name = rv_get_query("name");
412
			for(i = 0; name[i] != 0; i++) {
412
			for(i = 0; name[i] != 0; i++) {
413
				if(name[i] == REPO_USER_DELIM) {
413
				if(name[i] == REPO_USER_DELIM || name[i] == '#') {
414
					char cbuf[2];
414
					char cbuf[2];
415
					cbuf[0] = REPO_USER_DELIM;
415
					cbuf[0] = REPO_USER_DELIM;
416
					cbuf[1] = 0;
416
					cbuf[1] = 0;
417
					add_data(&page, "Repository name cannot contain '<code>");
417
					add_data(&page, "Repository name cannot contain '<code>");
418
					add_data(&page, cbuf);
418
					add_data(&page, cbuf);