Ruby on Rails help
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

Ruby on Rails help

8 Posts
6 Users
2 Reactions
87 Views
Posts: 91000
Free Member
Topic starter
 

I've got an app running in a docker container, I can access the container and rummage around on the filesystem. There are lots of .rb files. I know nothing about Ruby at all.

The problem is that the URL I have been given to access it returns a 404 all the time. Turns out this is the 404 page from Ruby itself - I have proved that by changing it. So how the heck do I figure out what URLs the application will respond to? I have a routes.rb file but I cannot make sense of it.


 
Posted : 31/08/2023 5:09 pm
Posts: 91000
Free Member
Topic starter
 

Oh, nevermind. In the best tradition of asking IT questions, I've fixed it just after posting the question. There was a whitelist...


 
Posted : 31/08/2023 5:14 pm
mrchrist reacted
Posts: 2616
Full Member
 

What is the correlation between asking an IT question and solving the problem within 15 seconds?

And why? I've lost count how many times that has happened.


 
Posted : 31/08/2023 10:01 pm
Posts: 91000
Free Member
Topic starter
 

Posted it on my work channel too, and had to retract it almost immediately 🙂 And yes, it was in the manual!


 
Posted : 31/08/2023 10:11 pm
Posts: 624
Free Member
 

What is the correlation between asking an IT question and solving the problem within 15 seconds

It causes your brain to think of it a different way when explaining it to others. See also looking at your code first thing in the morning and fixing something that you couldn't do the previous day.


 
Posted : 31/08/2023 11:06 pm
leffeboy reacted
Posts: 677
Full Member
 

The answer to the question (for whoever lands on this in the future) is that you can run rake routes from the application’s root directory (so you’d need a bash shell into the container).


 
Posted : 31/08/2023 11:16 pm
Posts: 13594
Free Member
 

You should really see a 401 error rather than 404 is it's denial of access via a Whitelist...


 
Posted : 01/09/2023 1:46 pm
Posts: 822
Free Member
Posts: 91000
Free Member
Topic starter
 

I had a bash shell in the container, I rummaged around but did not know what I was looking at.

You should really see a 401 error rather than 404 is it’s denial of access via a Whitelist…

Well arguably no, because getting a 401 instead of a 404 confirms the existence of a page, which is giving out information about the system. Then again, if all unauthenticated requests returned 401 that would solve that issue. Problem is this particular application is a composite with two UIs and two sets of credentials (because reasons) so all requests to the one with the whitelist get through the reverse proxy, so you see a 404 form the app itself not from the proxy so that sort of gives the same information anyway.


 
Posted : 01/09/2023 2:34 pm

6 DAYS LEFT
We are currently at 95% of our target!