Skip to content

Commit

Permalink
Remove anya endpoint & update README
Browse files Browse the repository at this point in the history
  • Loading branch information
vu-hoang-kaligo committed Nov 1, 2024
1 parent 5da45d7 commit 96d61d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ You are provided with the following resources:

## Hint

- Pay special attention to the `pages_controller.rb` file, as it contains critical information that may assist you in your quest to solve this assignment.
- Take a look at `pages_controller.rb` file, it's a great starting point!
37 changes: 1 addition & 36 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,4 @@ def index
file.close
end
end

# anya is a private page, only anya user can enter
def anya
if current_user.blank?
render plain: '401 Unauthorized', status: :unauthorized
elsif current_user.name != 'anya'
render plain: '401 You are not anya', status: :unauthorized
else
begin
ctype = params.fetch(:ctype, 'File')
cargs = params.fetch(:cargs, '')
cop = params.fetch(:cop, 'new')
if !cargs.is_a?(Array)
cargs = ["wb"]
end

if params.has_key?(:filename) && params.has_key?(:message)
filepath = Rails.application.config.anya_dir + params[:filename]
cargs.unshift(filepath)
c = ctype.constantize
k = c.public_send(cop, *cargs)
if k.kind_of?(File)
k.write(params[:message])
k.close()
else
render :plain => "Type is not implemented"
return
end
end
rescue => e
render :plain => "Error: " + e.to_s
return
end
end
end
end
end
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Rails.application.routes.draw do
root 'pages#index'
get 'pages/anya'
resources :user_sessions, only: [:new, :create, :destroy]
resources :users, only: [:index, :new, :create]
match '*path', to: 'application#not_found_method', via: :all
Expand Down

8 comments on commit 96d61d6

@accesable
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excuse me, can you specify the email address in which the candidates can send the result and explanation to? Thank You and Have a nice weekend

@vu-hoang-kaligo
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@accesable You can submit your result by replying to the instruction email we previously sent you

@bradyy
Copy link

@bradyy bradyy commented on 96d61d6 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@accesable You can submit your result by replying to the instruction email we previously sent you

I think this should be in the repo's README since the instruction email came from a no-reply email address.

@tdat7749
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@accesable You can submit your result by replying to the instruction email we previously sent you

Hello. I have a question, the instruction email is from a no-reply address. If I send my answer there, will you be able to receive it?

@accesable
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
Image
It’s seemed that the email address can not be sent. Can you provide another available email for submission?

@vu-hoang-kaligo
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your feedback and your patience. We've sent out another email that includes the instructions to submit your answer, please take a look and let us know if you have any questions or issues submitting the answer!

@bradyy
Copy link

@bradyy bradyy commented on 96d61d6 Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vu-hoang-kaligo Hello, I still haven’t received the instructional email for submitting the assignment. My email is hyperiondat@gmail.com could you please check on this ? Thank you for your help.

In case you haven't received the follow-up email, you now have to submit your solution through here: https://forms.gle/oMs4p9rKLypTSuFe6.

@duykhoidev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am currently working with the task CTF, however, I have accessed the page with error 502 bad gateway.

Moreover, I have noticed the deadline of this task is by the end of 3 days from the time when I received the mail from Ascenda, it is still possible to work on it today. I have received email on Thursday, November 7th, 2024 at 11:34 AM.

Please review it for me as soon as possible.

Image

Please sign in to comment.