OWASP / Serverless-Goat

OWASP ServerlessGoat: a serverless application demonstrating common serverless security flaws
GNU Affero General Public License v3.0
319 stars 95 forks source link

covert catdoc failed #10

Closed mendickxiao closed 5 years ago

mendickxiao commented 5 years ago

I found a very strange issue, first, I rebuild the serverless and deploy the API, then run the convert, it is successful, but after the lunch, I tried it again, it is failed. The log is like these:

Error: Command failed: curl --silent -L https://www.puresec.io/hubfs/document.doc | ./bin/catdoc - /bin/sh: ./bin/catdoc: Permission denied

at checkExecSyncError (child_process.js:601:13)
at Object.execSync (child_process.js:641:13)
at exports.handler (/var/task/index.js:31:29)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)

I googled in the website and found these page: https://sourceforge.net/p/htdig/mailman/message/10969346/ It sounds as though you have not installed catdoc, only compiled it.

Catdoc must be installed, as described in the INSTALL file, so that it ca= n find the cp1251.txt file and any others it may need.

Do we really need to install the catdoc?

I clone the code in my local, and test it. [root@lin-0aff6d1a convert]# curl --silent -L https://www.puresec.io/hubfs/document.doc | ./bin/catdoc - Cannot load charset cp1251 - file not found

The same error, and I installed the catdoc, it is work: [root@lin-0aff6d1a ~]# curl --silent -L https://www.puresec.io/hubfs/document.doc | catdoc - A Poison Tree / William Blake:

I was angry with my friend:

I told my wrath, my wrath did end.

I was angry with my foe:

I told it not, my wrath did grow.

And I watered it in fears,

Night and morning with my tears;
 

And I sunned it with smiles,

And with soft deceitful wiles.

And it grew both day and night,

Till it bore an apple bright.

And my foe beheld it shine.

And he knew that it was mine,

And into my garden stole

When the night had veiled the pole;
 

In the morning glad I see

My foe outstretched beneath the tree.

0xh0b0 commented 5 years ago

duplicate of #4 Please try to use the latest version of the code, the issue was fixed 7 months ago in #5