Git Product home page Git Product logo

Comments (12)

tschf avatar tschf commented on May 30, 2024 1

I think Oracle change something in the last fortnight. I did some analysis on another of my projects about a week back and came up with the following:

  1. Request file (edelivery)
  2. Redirect to login.do
  3. User submits, which sends a post to loginAuth.do. Response contains <meta http-equiv="refresh" content="3;URL=/oaam_server/authJump.do?jump=false"/> which causes 4.
  4. Call GET request to authJump.do (as that's what happens in the meta refresh above)
  5. Redirected to updateLoginStatus (via HTTP 302). The contains a form that is auto submitted in the browser, so you have to just resubmit the page to cred_submit (as from the form)
  6. Do a POST to cred_submit (as is expected from 5)

Also, the login form now has the following input fields (loginAuth.do):

//1. fk - a unique token that is returned in the form
//2. clientOffset - The offset hours from GMT.
//3. userid
//4. pass

I'm not sure how the request flow differs from what it was before, if any steps can be skipped.
Anyway, hope it helps.

from travis-oracle.

cbandy avatar cbandy commented on May 30, 2024

That probably means the login form changed. Can you check two things for me please?

Visit the login page in your browser and with the developer console:

  1. Does jQuery(document.forms[0]) evaluate to the login form? If not, you'll need to change the array index until we can identify the form some other way.

  2. What are the name attributes of the fields of the login form? If they are no longer ssousername and password, you'll need to set new environment variables that match the names.

from travis-oracle.

cbandy avatar cbandy commented on May 30, 2024

It looks like the form fields have changed names. Try using ORACLE_LOGIN_userid and ORACLE_LOGIN_pass instead.

from travis-oracle.

mloskot avatar mloskot commented on May 30, 2024

@cbandy Yes, indeed. I was about to update you about that, but didn't have chance to try the changed envrionment variables yet

from travis-oracle.

mloskot avatar mloskot commented on May 30, 2024

Try using ORACLE_LOGIN_userid and ORACLE_LOGIN_pass instead.

I've just tried https://travis-ci.org/SOCI/soci/jobs/291704587
and the "Unable to use all ORACLE_LOGIN environment variables" is gone now.

Something is not working with authentication though and ~20KB non-ZIP file is downloaded.

It seems to me that Oracle has added new hidden fields to the form, especially fk field getting generated value:

  • 1st load
<input type="hidden" id="clientOffset" name="clientOffset" />
<input type="hidden" id="fk" name="fk" value="6192307_9d12540afc45dfe2839073f8f02e21fc1ca6ac69b1a665d96e6166741b91110e"/>
  • 2nd load
<input type="hidden" id="clientOffset" name="clientOffset" />
<input type="hidden" id="fk" name="fk" value="6189592_a7646401171dcbf710b87585d8ab9fd3a3e6c425b0d57baa23662c07ddc51198"/>

etc

from travis-oracle.

cbandy avatar cbandy commented on May 30, 2024

Thanks, @mloskot, @tschf. All the form fields are captured and sent when submitting the login form. The trouble is the multiple new HTML pages returned by OAAM Server.

As it is now, download.js handles a few initial redirects, then uses the JavaScript context of the headless browser to parse the HTML form and write any cookies to a file. cURL submits the login form POST, handles the remaining redirects, and writes the ZIP file to disk.

To handle these new HTML pages after the login form, I think we'll have to stay in PhantomJS longer. Last I checked, however, PhantomJS wasn't very good when it came to the final file (i.e. getting a 200 MiB file out of the browser context.)

🤔 Perhaps the solution here is to first login without having requested the large file. Though, I'd like to not hardcode any new URLs... I'll try to devise a hotfix/workaround tomorrow. Any suggestions?

from travis-oracle.

mloskot avatar mloskot commented on May 30, 2024

@cbandy I wish I could help, but I know close to nothing about Node/PhantomJS, I'm afraid

from travis-oracle.

cbandy avatar cbandy commented on May 30, 2024

I have something working in Precise jobs, but more needs to be done to get all the right cookies out of the newer PhantomJS in Trusty jobs.

from travis-oracle.

cbandy avatar cbandy commented on May 30, 2024

get all the right cookies out of the newer PhantomJS

It turns out that wasn't so hard. I will occasionally encounter login failures, however, that I haven't been able to diagnose.

from travis-oracle.

cbandy avatar cbandy commented on May 30, 2024

Please try out the hotfix branch, and if it resolves this issue for you I'll cut a new release in the coming days. 💛

from travis-oracle.

mloskot avatar mloskot commented on May 30, 2024

@cbandy I've switched our build to the hotfix (SOCI/soci@3992cd8) and the build based on Oracle passed: https://travis-ci.org/SOCI/soci/jobs/294782925

Awesome, thanks!

from travis-oracle.

gabmontes avatar gabmontes commented on May 30, 2024

@cbandy I had the same issue and can also confirm your hotfix branch solved the problem.

Thanks!!

from travis-oracle.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.