If the content-security-policy is ineffective, a pop-up dialog 10 | box will appears. If there is no dialog box, then CSP is working 11 | correctly.
12 | 13 | 14 |As a double-check, open the Developer Console in your web-browser 17 | and verify that two CSP violations were detected and blocked.
18 | 19 | -------------------------------------------------------------------------------- /test/delta1.test: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2006 D. Richard Hipp 3 | # 4 | # This program is free software; you can redistribute it and/or 5 | # modify it under the terms of the Simplified BSD License (also 6 | # known as the "2-Clause License" or "FreeBSD License".) 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but without any warranty; without even the implied warranty of 10 | # merchantability or fitness for a particular purpose. 11 | # 12 | # Author contact information: 13 | # drh@hwaci.com 14 | # http://www.hwaci.com/drh/ 15 | # 16 | ############################################################################ 17 | # 18 | # Tests of the delta mechanism. 19 | # 20 | 21 | test_setup "" 22 | 23 | # Use test script files as the basis for this test. 24 | # 25 | # For each test, copy the file intact to "./t1". Make 26 | # some random changes in "./t2". Then call test-delta on the 27 | # two files to make sure that deltas between these two files 28 | # work properly. 29 | # 30 | set filelist [lsort [glob $testdir/*]] 31 | foreach f $filelist { 32 | if {[file isdir $f]} continue 33 | set base [file root [file tail $f]] 34 | set f1 [read_file $f] 35 | write_file t1 $f1 36 | for {set i 0} {$i<100} {incr i} { 37 | write_file t2 [random_changes $f1 1 1 0 0.1] 38 | fossil test-delta t1 t2 39 | test delta-$base-$i-1 {[normalize_result]=="ok"} 40 | write_file t2 [random_changes $f1 1 1 0 0.2] 41 | fossil test-delta t1 t2 42 | test delta-$base-$i-2 {[normalize_result]=="ok"} 43 | write_file t2 [random_changes $f1 1 1 0 0.4] 44 | fossil test-delta t1 t2 45 | test delta-$base-$i-3 {[normalize_result]=="ok"} 46 | } 47 | } 48 | 49 | set empties { "" "" "" a a "" } 50 | set i 0 51 | foreach {f1 f2} $empties { 52 | incr i 53 | write_file t1 $f1 54 | write_file t2 $f2 55 | fossil test-delta t1 t2 56 | test delta-empty-$i {[normalize_result]=="ok"} 57 | } 58 | ############################################################################### 59 | 60 | test_cleanup 61 | -------------------------------------------------------------------------------- /test/fileage-test-1.wiki: -------------------------------------------------------------------------------- 1 | 2 | This page contains URLs for file-age computations that have given 3 | trouble in the past. Shift-click on on the links, one-by-one, to verify 4 | that the current implementation works correctly: 5 | 6 | * [/fileage?name=c9df0dcdaa402] - Verify that the many 7 | execute permission changes that occurred about 24 hours before 8 | check-in c9df0dcdaa402 do not appear as file changes. 9 | 10 | * [/tree?ci=c9df0dcdaa40&mtime=0&type=tree] - Verify that all 11 | three skin files (css.txt, footer.txt, and header.txt) appear 12 | in all of the skin/*/ folders. 13 | 14 | * On both of the above, check for excessive computation time. 15 | -------------------------------------------------------------------------------- /test/markdown-test1.md: -------------------------------------------------------------------------------- 1 | 2 | Markdown Formatter Test Document 3 | ================================ 4 | 5 | This document is designed to test the markdown formatter. 6 | 7 | * A bullet item. 8 | * A subitem 9 | * Second bullet 10 | 11 | More text 12 | 13 | 1. Enumeration 14 | 1.1. Subitem 1 15 | 1.2. Subitem 2 16 | 2. Second enumeration. 17 | 18 | Another paragraph. 19 | 20 | 21 | 22 | Other Features 23 | -------------- 24 | 25 | Text can show *emphasis* or _emphasis_ or **strong emphassis**. 26 | -------------------------------------------------------------------------------- /test/merge2.test: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2006 D. Richard Hipp 3 | # 4 | # This program is free software; you can redistribute it and/or 5 | # modify it under the terms of the Simplified BSD License (also 6 | # known as the "2-Clause License" or "FreeBSD License".) 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but without any warranty; without even the implied warranty of 10 | # merchantability or fitness for a particular purpose. 11 | # 12 | # Author contact information: 13 | # drh@hwaci.com 14 | # http://www.hwaci.com/drh/ 15 | # 16 | ############################################################################ 17 | # 18 | # Tests of the delta mechanism. 19 | # 20 | 21 | test_setup "" 22 | 23 | set filelist [lsort [glob $testdir/*]] 24 | foreach f $filelist { 25 | if {[file isdir $f]} continue 26 | set base [file root [file tail $f]] 27 | if {[string match "utf16*" $base]} continue 28 | set f1 [read_file $f] 29 | write_file t1 $f1 30 | for {set i 0} {$i<100} {incr i} { 31 | expr {srand($i*2)} 32 | write_file t2 [set f2 [random_changes $f1 2 4 0 0.1]] 33 | expr {srand($i*2+1)} 34 | write_file t3 [set f3 [random_changes $f1 2 4 2 0.1]] 35 | expr {srand($i*2+1)} 36 | write_file t23 [random_changes $f2 2 4 2 0.1] 37 | expr {srand($i*2)} 38 | write_file t32 [random_changes $f3 2 4 0 0.1] 39 | fossil 3-way-merge t1 t2 t3 a23 40 | if {[regexp {<<<<< BEGIN MERGE CONFLICT:} [read_file a23]]} continue 41 | test merge-$base-$i-23 {[same_file a23 t23]} 42 | fossil 3-way-merge t1 t3 t2 a32 43 | test merge-$base-$i-32 {[same_file a32 t32]} 44 | } 45 | } 46 | 47 | ############################################################################### 48 | 49 | test_cleanup 50 | -------------------------------------------------------------------------------- /test/merge6.test: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 D. Richard Hipp 3 | # 4 | # This program is free software; you can redistribute it and/or 5 | # modify it under the terms of the Simplified BSD License (also 6 | # known as the "2-Clause License" or "FreeBSD License".) 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but without any warranty; without even the implied warranty of 10 | # merchantability or fitness for a particular purpose. 11 | # 12 | # Author contact information: 13 | # drh@hwaci.com 14 | # http://www.hwaci.com/drh/ 15 | # 16 | ############################################################################ 17 | # 18 | # Tests of the "merge" command 19 | # 20 | 21 | #################################################################### 22 | # TEST 1: Handle multiple merges each with one or more ADDED files # 23 | #################################################################### 24 | 25 | test_setup 26 | fossil ls 27 | 28 | test merge_multi-0 {[normalize_result] eq {}} 29 | 30 | write_file f1 "f1 line" 31 | fossil add f1 32 | fossil commit -m "base file" 33 | fossil ls 34 | 35 | test merge_multi-1 {[normalize_result] eq {f1}} 36 | 37 | fossil update trunk 38 | write_file f2 "f2 line" 39 | fossil add f2 40 | fossil commit -m "branch for file f2" -b branch_for_f2 41 | fossil ls 42 | 43 | test merge_multi-2 {[normalize_result] eq {f1 44 | f2}} 45 | 46 | fossil update trunk 47 | write_file f3 "f3 line" 48 | write_file f4 "f4 line" 49 | fossil add f3 50 | fossil add f4 51 | fossil commit -m "branch for files f3 and f4" -b branch_for_f3_f4 52 | fossil ls 53 | 54 | test merge_multi-3 {[normalize_result] eq {f1 55 | f3 56 | f4}} 57 | 58 | fossil update trunk 59 | fossil merge branch_for_f2 60 | fossil merge branch_for_f3_f4 61 | fossil commit -m "new trunk files f2, f3, and f4 via merge" 62 | fossil ls 63 | 64 | test merge_multi-4 {[normalize_result] eq {f1 65 | f2 66 | f3 67 | f4}} 68 | 69 | ############################################################################### 70 | 71 | test_cleanup 72 | -------------------------------------------------------------------------------- /test/merge_renames_2.test: -------------------------------------------------------------------------------- 1 | # 2 | # Tests for merging with renames 3 | # 4 | # 5 | 6 | proc commit_id {version} { 7 | regexp -line {^artifact:\s+(\S+)} [fossil whatis $version] - id 8 | return $id 9 | } 10 | 11 | require_no_open_checkout 12 | 13 | ################################################################# 14 | # Test 1 # 15 | # https://fossil-scm.org/forum/forumpost/549700437b # 16 | ################################################################# 17 | 18 | test_setup 19 | 20 | write_file file1 "file1\n" 21 | fossil add file1 22 | fossil commit -m "added file1" 23 | 24 | write_file file2 "file2\n" 25 | fossil add file2 26 | fossil commit -m "added file2" --branch added 27 | 28 | write_file file2 "edit file2 on added\n" 29 | fossil commit -m "edited file2" 30 | 31 | fossil mv --hard file2 file2.renamed 32 | fossil commit -m "renamed file2" --branch renamed 33 | 34 | fossil branch new branched current 35 | 36 | write_file file2.renamed "edit file2.renamed on renamed\n" 37 | fossil commit -m "edited file2.renamed" 38 | 39 | fossil update trunk 40 | fossil merge renamed 41 | fossil commit -m "merged from renamed" 42 | 43 | write_file file2.renamed "edit file2.renamed on trunk (1)\n" 44 | fossil commit -m "edited file2.renamed on trunk (1)" 45 | 46 | fossil update branched 47 | fossil merge trunk 48 | test_status_list merge_renames_2-1.1 $RESULT {UPDATE file2.renamed} 49 | fossil commit -m "merged edit from trunk (1:this merge succeeded)" 50 | 51 | fossil update trunk 52 | write_file file2.renamed "edit2 file2.renamed on trunk (2)\n" 53 | fossil commit -m "edited file2.renamed on trunk (2)" 54 | 55 | fossil update branched 56 | fossil merge trunk 57 | test_status_list merge_renames_2-1.2 $RESULT {UPDATE file2.renamed} 58 | 59 | test_cleanup 60 | -------------------------------------------------------------------------------- /test/merge_warn.test: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2016 D. Richard Hipp 3 | # 4 | # This program is free software; you can redistribute it and/or 5 | # modify it under the terms of the Simplified BSD License (also 6 | # known as the "2-Clause License" or "FreeBSD License".) 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but without any warranty; without even the implied warranty of 10 | # merchantability or fitness for a particular purpose. 11 | # 12 | # Author contact information: 13 | # drh@hwaci.com 14 | # http://www.hwaci.com/drh/ 15 | # 16 | ############################################################################ 17 | # 18 | # Testing "merge" command warnings 19 | # 20 | 21 | test_setup 22 | 23 | write_file f1 "f1" 24 | fossil add f1 25 | fossil commit -m "add f1" --tag pivot 26 | 27 | write_file f2 "f2" 28 | fossil add f2 29 | fossil commit -m "add f2" 30 | 31 | fossil update pivot 32 | fossil rm --hard f1 33 | write_file f2 "f2.1" 34 | write_file f3 "f3" 35 | fossil add f2 f3 36 | fossil commit -b b -m "delete f1, add f2 and f3" --tag mrg 37 | 38 | write_file f4 "f4" 39 | fossil add f4 40 | fossil commit -m "add f4" 41 | 42 | fossil update trunk 43 | write_file f1 "f1.1" 44 | write_file f3 "f3.1" 45 | fossil merge --integrate mrg -expectError 46 | test_status_list merge_warn-1 $RESULT { 47 | WARNING: 1 unmanaged files were overwritten 48 | WARNING: 2 merge conflicts 49 | DELETE f1 50 | MERGE f2 51 | ADDED f3 (overwrites an unmanaged file), original copy backed up locally 52 | WARNING: local edits lost for f1 53 | } 54 | test merge_warn-2 { 55 | [string first "ignoring --integrate: mrg is not a leaf" $RESULT]>=0 56 | } 57 | 58 | ############################################################################### 59 | 60 | test_cleanup 61 | -------------------------------------------------------------------------------- /test/subdir with spaces/filename with spaces.txt: -------------------------------------------------------------------------------- 1 | This file has a name that contains spaces. It is used to help verify 2 | that fossil can handle filenames that contain spaces. 3 | -------------------------------------------------------------------------------- /test/subdir-b/readme.txt: -------------------------------------------------------------------------------- 1 | This file exists in order to create the "subdir-b" subdirectory. There is 2 | exists sibling directory "subdir" that is a prefix of this subdirectory. 3 | This file exists for self-testing. 4 | -------------------------------------------------------------------------------- /test/subdir/README.html: -------------------------------------------------------------------------------- 1 |4 | The test/subdir/ directory and its children exist purely for testing 5 | in the self-hosting Fossil repository. This particular file is used 6 | to verify that a file name "README.html" is displayed correctly. 7 | beneath the directory listing. 8 |
9 | 10 |This | is |
a | <table> |
15 | . fossil_prompt.sh 16 |17 | 18 | For a permanent installation, you can graft the code into your 19 | .bashrc file in your home directory. 20 | 21 | The code is very simple (only 32 non-comment lines, as of this writing) 22 | and hence easy to customize. 23 | -------------------------------------------------------------------------------- /www/hacker-howto.wiki: -------------------------------------------------------------------------------- 1 |
8 | fossil server $REPOSITORY --port 9000 --scgi 9 |10 | 11 | Then configure your SCGI-aware web-server to send SCGI requests to port 12 | 9000 on the machine where Fossil is running. A typical configuration for 13 | this in Nginx is: 14 | 15 |
16 | location ~ ^/demo_project/ { 17 | include scgi_params; 18 | scgi_pass localhost:9000; 19 | scgi_param SCRIPT_NAME "/demo_project"; 20 | scgi_param HTTPS "on"; 21 | } 22 |23 | 24 | Note that Nginx does not normally send either the PATH_INFO or SCRIPT_NAME 25 | variables via SCGI, but Fossil needs one or the other. So the configuration 26 | above needs to add SCRIPT_NAME. If you do not do this, Fossil returns an 27 | error. 28 | -------------------------------------------------------------------------------- /www/server/any/althttpd.md: -------------------------------------------------------------------------------- 1 | # Serving via althttpd 2 | 3 | [Althttpd][althttpd] 4 | is a light-weight web server that has been used to implement the SQLite and 5 | Fossil websites for well over a decade. Althttpd strives for simplicity, 6 | security, ease of configuration, and low resource usage. 7 | 8 | To set up a Fossil server as CGI on a host running the althttpd web 9 | server, follow these steps. 10 |