author | Lars Hjemli <larsh@hal-2004.(none)> | 2007-01-04 15:53:03 (UTC) |
---|---|---|
committer | Lars Hjemli <larsh@hal-2004.(none)> | 2007-01-04 15:57:00 (UTC) |
commit | 52e605caf573fa20fdd4fbac5e1cc69b7740b1f5 (patch) (unidiff) | |
tree | 62c7bfb147f93a850f430185961a89ee51b8470a /cgit.h | |
parent | 05b13194b4b40a2614692125d5037ef20c5fb20e (diff) | |
download | cgit-52e605caf573fa20fdd4fbac5e1cc69b7740b1f5.zip cgit-52e605caf573fa20fdd4fbac5e1cc69b7740b1f5.tar.gz cgit-52e605caf573fa20fdd4fbac5e1cc69b7740b1f5.tar.bz2 |
Handle %xx encoding in querystring
Convert valid %xx expressions in querystring to ascii, ignore invalid
expressions (i.e. eat the three characters %xx).
Signed-off-by: Lars Hjemli <larsh@hal-2004.(none)>
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -38,64 +38,66 @@ extern char *cgit_virtual_root; | |||
38 | extern char *cgit_cache_root; | 38 | extern char *cgit_cache_root; |
39 | 39 | ||
40 | extern int cgit_nocache; | 40 | extern int cgit_nocache; |
41 | extern int cgit_max_lock_attempts; | 41 | extern int cgit_max_lock_attempts; |
42 | extern int cgit_cache_root_ttl; | 42 | extern int cgit_cache_root_ttl; |
43 | extern int cgit_cache_repo_ttl; | 43 | extern int cgit_cache_repo_ttl; |
44 | extern int cgit_cache_dynamic_ttl; | 44 | extern int cgit_cache_dynamic_ttl; |
45 | extern int cgit_cache_static_ttl; | 45 | extern int cgit_cache_static_ttl; |
46 | extern int cgit_cache_max_create_time; | 46 | extern int cgit_cache_max_create_time; |
47 | 47 | ||
48 | extern char *cgit_repo_name; | 48 | extern char *cgit_repo_name; |
49 | extern char *cgit_repo_desc; | 49 | extern char *cgit_repo_desc; |
50 | extern char *cgit_repo_owner; | 50 | extern char *cgit_repo_owner; |
51 | 51 | ||
52 | extern int cgit_query_has_symref; | 52 | extern int cgit_query_has_symref; |
53 | extern int cgit_query_has_sha1; | 53 | extern int cgit_query_has_sha1; |
54 | 54 | ||
55 | extern char *cgit_querystring; | 55 | extern char *cgit_querystring; |
56 | extern char *cgit_query_repo; | 56 | extern char *cgit_query_repo; |
57 | extern char *cgit_query_page; | 57 | extern char *cgit_query_page; |
58 | extern char *cgit_query_search; | 58 | extern char *cgit_query_search; |
59 | extern char *cgit_query_head; | 59 | extern char *cgit_query_head; |
60 | extern char *cgit_query_sha1; | 60 | extern char *cgit_query_sha1; |
61 | extern char *cgit_query_sha2; | 61 | extern char *cgit_query_sha2; |
62 | extern int cgit_query_ofs; | 62 | extern int cgit_query_ofs; |
63 | 63 | ||
64 | extern int htmlfd; | 64 | extern int htmlfd; |
65 | 65 | ||
66 | extern void cgit_global_config_cb(const char *name, const char *value); | 66 | extern void cgit_global_config_cb(const char *name, const char *value); |
67 | extern void cgit_repo_config_cb(const char *name, const char *value); | 67 | extern void cgit_repo_config_cb(const char *name, const char *value); |
68 | extern void cgit_querystring_cb(const char *name, const char *value); | 68 | extern void cgit_querystring_cb(const char *name, const char *value); |
69 | 69 | ||
70 | extern int hextoint(char c); | ||
71 | |||
70 | extern void *cgit_free_commitinfo(struct commitinfo *info); | 72 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
71 | 73 | ||
72 | extern char *fmt(const char *format,...); | 74 | extern char *fmt(const char *format,...); |
73 | 75 | ||
74 | extern void html(const char *txt); | 76 | extern void html(const char *txt); |
75 | extern void htmlf(const char *format,...); | 77 | extern void htmlf(const char *format,...); |
76 | extern void html_txt(char *txt); | 78 | extern void html_txt(char *txt); |
77 | extern void html_ntxt(int len, char *txt); | 79 | extern void html_ntxt(int len, char *txt); |
78 | extern void html_attr(char *txt); | 80 | extern void html_attr(char *txt); |
79 | extern void html_hidden(char *name, char *value); | 81 | extern void html_hidden(char *name, char *value); |
80 | extern void html_link_open(char *url, char *title, char *class); | 82 | extern void html_link_open(char *url, char *title, char *class); |
81 | extern void html_link_close(void); | 83 | extern void html_link_close(void); |
82 | extern void html_filemode(unsigned short mode); | 84 | extern void html_filemode(unsigned short mode); |
83 | 85 | ||
84 | extern int cgit_read_config(const char *filename, configfn fn); | 86 | extern int cgit_read_config(const char *filename, configfn fn); |
85 | extern int cgit_parse_query(char *txt, configfn fn); | 87 | extern int cgit_parse_query(char *txt, configfn fn); |
86 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); | 88 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); |
87 | 89 | ||
88 | extern void cache_prepare(struct cacheitem *item); | 90 | extern void cache_prepare(struct cacheitem *item); |
89 | extern int cache_lock(struct cacheitem *item); | 91 | extern int cache_lock(struct cacheitem *item); |
90 | extern int cache_unlock(struct cacheitem *item); | 92 | extern int cache_unlock(struct cacheitem *item); |
91 | extern int cache_cancel_lock(struct cacheitem *item); | 93 | extern int cache_cancel_lock(struct cacheitem *item); |
92 | extern int cache_exist(struct cacheitem *item); | 94 | extern int cache_exist(struct cacheitem *item); |
93 | extern int cache_expired(struct cacheitem *item); | 95 | extern int cache_expired(struct cacheitem *item); |
94 | 96 | ||
95 | extern char *cgit_repourl(const char *reponame); | 97 | extern char *cgit_repourl(const char *reponame); |
96 | extern char *cgit_pageurl(const char *reponame, const char *pagename, | 98 | extern char *cgit_pageurl(const char *reponame, const char *pagename, |
97 | const char *query); | 99 | const char *query); |
98 | 100 | ||
99 | extern void cgit_print_error(char *msg); | 101 | extern void cgit_print_error(char *msg); |
100 | extern void cgit_print_date(unsigned long secs); | 102 | extern void cgit_print_date(unsigned long secs); |
101 | extern void cgit_print_docstart(char *title, struct cacheitem *item); | 103 | extern void cgit_print_docstart(char *title, struct cacheitem *item); |