so's People
Forkers
cajum lucianmincea bg2d giorgianav radusoare serbanso dianapatru anca0305 stefaniaizabel cs-pub-ro alexdragus sergiubabin ghennac molecula2788 radunichita raresnevodar mandrei12 codrutlemeni vladproteasa ursudanandrei horiacool bogdanbg2 alinmihaila99 rkibistu bondoc razvsa banicaliviu radu25 teodutu theotudose madalin17 dosarudaniel savacezarmarian14 cristinagrigore arinaturcu imihai9 eduardscaueru comancalin stefa12034 mateistuparu laurcump dragos0305 robertalexa2000 oanarusu13 avramstefan vladandra22 dragomir1401 alexlazu1 ioanavalerie radudin11 deliacraciun cezica catalinabogdan valy3124 dd00m eric-zaharia melidia andreivoicu chituandrei ana-andreea munteanualexandru02 karlaniculae burak2906 ioanavivi12 alexpreda24 dianabtc meli2502 vladgeorge18 emehigh mihneagheorghiu clear-intec alesandrei54321 alexandraburnichi ryuuandrei cristinaionela07 andrei6060 alextoader10 cristinagnn ana-nacu alexandrastefan02 ilie27 mihai-andrei3 nataliagorin yannickko alexneacsu69 ionut-2334 bvrazvan alexandrucarp tibiksx vasilaki22 laviniaaa11 irenemiha tudy53 andreeaa23 stefaniv21 elena19m ileanagheo ursachecodrut tiberiudeak dimtry28so's Issues
infrastructure: update ubuntu vm
I can't think of a very good reason for this, given that 18.04 is still supported. And that we don't have an explicit requirement for newer development tools. But, students might be impressed that we keep our infra up-to-date. And we could get them used with corporate best-practices.
infrastrucutre: add Windows 10 vm
There are no legal issues concerning the distribution of VM build scripts. And Microsoft provides free-to-download ISOs for Windows 10.
assignments: [5-aws] Create non-static/non-dynamic file for test_bad_path_404
Question
Should not it be forbidden to be able to receive a file from outside the directories static/
and dynamic/
?
I presume that test_bad_path_404
should verify this.
However, it tests the same thing as test_get_bad_file_404
, namely that 404
should be returned for a non-existent file.
Solution
Create the file xyzt/abcdef.dat
before trying to get it.
Expected outcome
Receive 404 Not Found
or 403 Forbidden
.
The mentioned tests
5-aws/checker-lin/_test/run_test.sh:506
test_get_bad_file_404()
{
init_test
echo -ne "GET /$(basename $static_folder)/abcdef.dat HTTP/1.0\r\n\r\n" | \
nc -q 1 localhost $aws_listen_port > abcdef.dat 2> /dev/null
head -1 abcdef.dat | grep '^HTTP/' | grep '404' > /dev/null 2>&1
basic_test test $? -eq 0
rm abcdef.dat
cleanup_test
}
# Use non-static and non-dynamic file path
test_bad_path_404()
{
init_test
echo -ne "GET /xyzt/abcdef.dat HTTP/1.0\r\n\r\n" | \
nc -q 1 localhost $aws_listen_port > abcdef.dat 2> /dev/null
head -1 abcdef.dat | grep '^HTTP/' | grep '404' > /dev/null 2>&1
basic_test test $? -eq 0
rm abcdef.dat
cleanup_test
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.