Forum Activity for @kevinm

KevinM
@kevinm
07/11/18 12:24:56PM
36 posts

Proxima API file Downloading Problem


Proxima

Yes, But ONLY to the User that owns that profile. They are signing in via Proxima to access there own account info and media. The owner can GET the info but cant download due to the jrUser_can_edit_item check even though they are the owner.
KevinM
@kevinm
07/10/18 01:53:08PM
36 posts

Proxima API file Downloading Problem


Proxima

Hey Guys,
Im trying to use Proxima to "GET" audio info from a sister site. The get request is complete with the download URL but when I go to download it, it says "Error: offsite media downloads are blocked". I dont have the "block file downloads" checked in the Audio module but do have have a price greater than 0 so it looks like it cant be downloaded.

I did notice the profile owner can download their own files , can this be allowed via PROXIMA when the logged in (in Proxima) owner is the profile owner to be able to retrieve files via the API?
I would customize but this looks to happen in the CORE module (index.php line 6499)
Any thoughts?
Regards!

UPDATE: FIXED the error offsite by adding All domains allowed but now get the Item must be purchased to be downloaded. I see there is a jrUser can edit item check. Can we get this to work with users that sign in with Proxima?? (Possibly editing the jrUser_can_edit_item function to add the Proxima User?)
updated by @kevinm: 12/11/18 04:31:12PM
KevinM
@kevinm
06/15/18 06:03:31PM
36 posts

Proxima Invalid Item owner


Proxima

Thanks for the verify Michael, I think you are correct in that the info isnt getting stored in the session.

Brian have you found anything?
KevinM
@kevinm
05/25/18 11:28:54PM
36 posts

Proxima Invalid Item owner


Proxima

Michael,
Im signing in with the admin credentials along with the "master key" for the only app I have, to get the session_id to which I copy as the password for the remainder of the session. In the Header section I can see an Authorization "basic" value which has been generated. I try to POST or PUT into an activated bridge datastore and I get the invalid user session error. (Using GET with those credentials gets me the info). I see in the functions its calling that its looking for the $SESSION['app_user_session_id'] (or something similar) and probably not finding it as when I am in xdebug I can see no $SESSION variables with app_

Brian,
FYI,
I was getting that error and added the above code as I saw it was in the jrProxima_Core code for a workaround and its gotten me past that point using the master key but I havent been able to test it thoroughly against the regular key. It may have to do with the problem im having thou..

Im going to reinstall the proxima modules to see if that shakes it out.

Edited: Re-installed and no change.
updated by @kevinm: 05/26/18 12:59:39AM
KevinM
@kevinm
05/24/18 02:29:08PM
36 posts

Proxima Invalid Item owner


Proxima

Michael,

Is there ANY way of finding out who is logged in or if a session is still active in Proxima (or how I can correctly DELETE any active sessions)?
KevinM
@kevinm
05/23/18 01:20:03AM
36 posts

Proxima Invalid Item owner


Proxima

Hi Michael, I believe I solved that problem by adding this by modifying the code in jrProximaBridge include.php below:

if (!isset($_rt['_user_id']) || ($_rt['_user_id'] != jrProximaCore_get_session_user_id() && jrProximaCore_get_client_access_level() != 'master')) {
return jrProximaCore_http_response(401, 'invalid item owner');
}

I added jrProximaCore_get_client_access_level() != 'master') as I saw it in the proxima Core module too at lines 278 and 373. Let me know if this addition makes sense to you as it works when I use the Master Key!

I am logging in as Master admin (user_id=1) but am hitting the next group of code in ProximaBridge which is giving me the "invalid user session"..This code is below at line 383

// Validate Profile Quota
$_us = jrProximaCore_get_session_user_info();
if (!$_us) {
// Should not happen
return jrProximaCore_http_response(401, 'invalid user session');
}

Again I am logged in as Master Admin and using the master key in an app generated by the jrProximaCore (brand new app) and am receiving this error after putting in the session Id to get the basic Auth. I am testing all this with Postman but also seeing the error when running Xdebug in PHPStorm. When I comment out the questioning code above it runs and updates the datastore.

Any help would be greatly appreciated!

PS: here is the postman wording when using "PUT" to https://........./api/bridge/mymodule/1
Header has the basic Auth with the hex value and the body has a simple test key/value to update the item#1

{
"code": 401,
"text": "Unauthorized",
"note": "invalid user session"
}

PSS. using "GET" and searching the same bridge module returns my query fine with the same credentials.

Thanks
updated by @kevinm: 05/23/18 01:25:55AM
KevinM
@kevinm
05/22/18 02:46:32PM
36 posts

Proxima Invalid Item owner


Proxima

I see that in the Proxima code that the _user_id has to match the sessions user id. Should this permission be bypassed when using the Master Key?
KevinM
@kevinm
05/22/18 12:15:55PM
36 posts

Proxima Invalid Item owner


Proxima

Im trying to update a user profile thru Proxima using the bridge app. I can sign in as Admin, and when I use the master key, session ID to GET to search the profiles I can see my queries come up fine. When I go to update (PUT) using the same master key and session ID, i get a 401 error stating Invalid item owner. I thought using the master key would allow me to get around those permissions but im hitting a wall trying to get around it. Any thoughts?
updated by @kevinm: 10/25/18 11:46:27PM
KevinM
@kevinm
11/28/17 12:17:23AM
36 posts

Can you give an example of using the Proxima file API?


Proxima

Hey guys,

Love the Proxima API! Its a huge time saver and extremely useful.

Im having a problem getting my head around how the Proxima file is used and after
seeing the other Proxima File (How to use it) topic I still couldn't wrap my head around it.

I know the proxima file is automatic in its support to other proxima modules, but how can I get the users songs and videos (files) from one jamroom website to put into another? I can GET ( http://example.com/api/user/6) the user data and then POST to the other datastore but am at a loss of how to include the associated files in the URLs and POST the file(s) to the new destination.

Greatly appreciate any help and insights!
updated by @kevinm: 02/26/18 10:29:06AM
KevinM
@kevinm
09/16/16 04:58:36PM
36 posts

Jamroom 4 Archive Site


Off Topic

Yes as I have JR5 also. I understand there is a new, improved platform in JR5 but there are some that still for a variety of reasons are using JR4. I can understand that there is no more support for that platform and can respect the time limits for support of any platform but there is still a giant wealth of information in the archives that people can look up and reference without the need of support.
  3